PEAR-wide code quality issue (fix proposal for possible class redeclare errors)

From: Date: Sat, 15 Jul 2006 21:26:57 +0000
Subject: PEAR-wide code quality issue (fix proposal for possible class redeclare errors)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-43484@lists.php.net to get a copy of this message
Hello all, hearing all those irritated voices I still dare to ask... why can't be ALL classes defined like: ================================ if ( !class_exists( "SOME_Package_And_Class_Name" ) ) { class SOME_Package_And_Class_Name { // code } } ================================ I have got some "cannot redeclare" issues with autoloading classes and this was a really helpful fix (to PEAR classes...) If this is not dangerous at all (or is it?) maybe it could be possible to patch PEAR classes in this way. Just preventing the redeclare fatal error? best regards Peter Fiksman P.S. idea from cristiano at aspatech dot com dot br (24-Jun-2002 08:36!), found on http://www.php3.de/class-exists

« previous php.pear.dev (#43484) next »