PHP Class Constants

class Person
    const NAME = "Milap";
    const SURNAME = "Patel";

echo Person::NAME;
echo "<br />";
echo Person::SURNAME;

Output :-


4 thoughts on “PHP Class Constants

  1. I think this is among the most significant information for me.
    And i’m glad reading your article. But should remark on few general things, The site style is wonderful, the articles is really great : D. Good job, cheers


  2. When someone writes an piece of writing he/she retains the image of a user in his/her brain that how a user can know it.
    So that’s why this post is outstdanding. Thanks!


I like to hear from you about this !!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s