Re: [PHP-DEV] __autoload() and class_exists()

2005-02-22 Thread Stephan Schmidt
Hi, Marcus Boerger schrieb: Expected behavior that can be changed: proto bool class_exists(string classname [, bool autoload]) "RTFM" or is it undocumented? Ooops, didn't check the manual for class_exists() in the last months... Stephan -- http://www.php-tools.net http://www.schst.net http://pear.p

Re: [PHP-DEV] __autoload() and class_exists()

2005-02-22 Thread Marcus Boerger
Hello Stephan, Tuesday, February 22, 2005, 8:59:27 PM, you wrote: > Hi, > I just found this strange behaviour in PHP5: > When using class_exists() to test, whether a class exists, the magic > function __autoload() is called: Expected behavior that can be changed: proto bool class_exists(stri

[PHP-DEV] __autoload() and class_exists()

2005-02-22 Thread Stephan Schmidt
Hi, I just found this strange behaviour in PHP5: When using class_exists() to test, whether a class exists, the magic function __autoload() is called: function __autoload($class) { echo "Trying to load $class\n"; } if (!class_exists('DB')) { echo "DB does not exist.\n"; } You'll get: Trying t