BobbyPeng Posted November 20, 2010 Share Posted November 20, 2010 hi i have some questions about spl_autoload_register when the first param is null. eg. spl_autoload_register(null, false); the manul describe" If no parameter is provided, then the default implementation of spl_autoload() will be registered." now why the follow can't run <?php spl_autoload_register(NULL, false); spl_autoload_extensions('.class.php, .php'); $demo2 = new Demo2();//Demo2.class.php is exist ?> the fllow can run <?php spl_autoload_extensions('.class.php, .php'); spl_autoload('Demo2'); $demo2 = new Demo2(); ?> so , what's the meaning of spl_autoload_register(null, false)? anyone can give me some examples, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/219272-spl_autoload_register/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.