PHP OOP Tutorial for absolute Beginners part -3 (CLASS CONSTANT)

Опубликовано: 14 Август 2018
на канале: Code With Mehedi
892
28

PHP OOP Tutorial for absolute Beginners part -3 CLASS CONSTANT
Class constants
Just like defining other constants outside of a class using const keyword, we can also define them inside a class. The default visibility of class constants is public.

Constants are allocated once per class, and not for each class instance.

Scope Resolution Operator ::
Instead of using double colon allows access to static and constant. This operator is also used to access super class features.

Using self
Instead of using $this, the self keyword is used to access constants within the class. Generally, for all class level access self should be used and for all current object instance access $this should be used within the class.

➠ ➠ Please do not hesitate to Knock Here ➠ ➠
---------------------------------------------------------------------------
➽Visit our website: http://code4webs.com
➽Visit Facebook :  / code4webs  

*******************************************************


Смотрите видео PHP OOP Tutorial for absolute Beginners part -3 (CLASS CONSTANT) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Code With Mehedi 14 Август 2018, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 892 раз и оно понравилось 28 людям.