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

Published: 14 August 2018
on channel: 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  

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


Watch video PHP OOP Tutorial for absolute Beginners part -3 (CLASS CONSTANT) online without registration, duration hours minute second in high quality. This video was added by user Code With Mehedi 14 August 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 892 once and liked it 28 people.