note 17202 rejected from function.class-exists by zak

From: Date: Thu, 29 Nov 2001 15:53:53 +0000
Subject: note 17202 rejected from function.class-exists by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21436@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.

« previous php.notes (#21436) next »