Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Final class constants - PHP 8.1

class Foo
{
    final public const XX = "foo";
}

class Bar extends Foo
{
    public const XX = "bar"; // Fatal error
}
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #Final #class #constants #PHP
ADD COMMENT
Topic
Name
2+9 =