June 2017
Intermediate to advanced
536 pages
9h 49m
English
There are five types of access modifier in PHP: public, private, protected, abstract, and final. Often called visibility modifiers, not all of them are equally applicable. Their use is spread across classes, functions, and variables, as follows:
Class constants, however, are not on the list. The older versions of PHP did not allow a visibility modifier on the class constant. By default, class constants were merely assigned public visibility.
The PHP 7.1 release addresses this limitation by introducing the public, private, and protected class constant visibility modifiers, as ...
Read now
Unlock full access