Kurinchi Blogger Scribbles …


Feb 15
2009

PHP: How to print a name of a class?

Last updated: May 21st, 2009

The following code helps identifying the name of the class with the usage of PHP constant __CLASS__

class myClass{

    function __construct(){
        echo "You are now inside class = ".__CLASS__;
    }

}

Tags:

Leave a Reply


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict