note 17202 added to function.class-exists

From: Date: Thu, 29 Nov 2001 15:52:43 +0000
Subject: note 17202 added to function.class-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-21435@lists.php.net to get a copy of this message
The method 'class_exists' doesn't work really properly. In the function declarion I've used "if (!class_exist("foo")) include ("foo.php");". After that I have used the same check in another function and when I've called function1(); function2(); the !class_exists("foo.php") in the function2 evaluated as true and the class 'foo.php' was included twice, what resulted into a fatal error. -- http://www.php.net/manual/en/function.class-exists.php http://master.php.net/manage/user-notes.php?action=edit+17202 http://master.php.net/manage/user-notes.php?action=delete+17202 http://master.php.net/manage/user-notes.php?action=reject+17202

« previous php.notes (#21435) next »