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, duration hours minute second in high quality that is uploaded to the channel Code With Mehedi 14 August 2018. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 892 times and liked it 28 visitors.