Re: PHP_Compat, signature changes

From: Date: Mon, 06 Jun 2005 08:42:32 +0000
Subject: Re: PHP_Compat, signature changes
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37994@lists.php.net to get a copy of this message
Okay, this is what I am going to do: I'll store each component (only those components that have had a signature change) in its own file, like is done now. Each file will look like this (microtime as an example). Compat/Function/microtime.php: function php_compat_microtime($arg1, $arg2) { // body of code } if (!function_exists('microtime')) { function microtime($arg1, $arg2) { return php_compat_microtime($arg1, $arg2); } } The user can use the latest version of microtime explicitly with php_compat_microtime(), or if they're just happy with the function being defined, microtime(). Other than being slow (better than code duplication I think), are there any foreseeable problems with this implementation?

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