note 22598 deleted from function.class-exists by derick

From: Date: Wed, 06 Aug 2008 11:03:43 +0000
Subject: note 22598 deleted from function.class-exists by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143204@lists.php.net to get a copy of this message
Note Submitter: cristiano at aspatech dot com dot br ---- This can be veeeery usefull if you use classes that uses other classes, which can be used in your front end. In other words, when you lost the control of which classes are declared in which point of the application, that can generate the "Cannot redeclare class". Use like <?php if ( !class_exists( "YourClass" ) ) { class YourClass { //your code } } ?> Thats it... Resolve all your problems =)

« previous php.notes (#143204) next »