__Autoload( ) Is Called Whenever You Try To Create An Object Of A Class That Hasn’t Been Defined

<?
    function __autoload($Class) {
            print "Bar class name: $Class!\n";
            include "barclass.php";
    }    $foo = new Bar;
    $foo->wombat( );
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.