Re: PEAR::Date broken (Was: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c php_date.h)

From: Date: Tue, 18 Jul 2006 21:51:58 +0000
Subject: Re: PEAR::Date broken (Was: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c php_date.h)
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-24549@lists.php.net to get a copy of this message
I know I only lurk here usually, and this may be a daft idea but if I don't throw it in the water I'll never know if it can float. Why not allow classes and functions be overridden? For example, if I define a function named mysql_query it replaces the existing function and raises an E_STRICT error stating that it's hiding an existing function. Likewise if I define a class named mysqli. It may not be a solution to problems like PEAR::Date, but it would allow BC to be retained where needed in exchange for some E_STRICT notices. I can think of several other uses for such behaviour, but I'm not experienced enough to know the implementation implications. It would certainly need an INI flag to enable/disable it but I would suggest that it be enabled by default. -Stut

« previous php.internals (#24549) next »