Re: PHP_Compat, signature changes
| From: | bertrand Gugger | Date: | Mon, 06 Jun 2005 12:37:22 +0000 |
| Subject: | Re: PHP_Compat, signature changes | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37998@lists.php.net to get a copy of this message | ||
Hi Aidan & all,
Aidan Lister wrote:
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')) { How could that be ?
function microtime($arg1, $arg2) {bertrand Gugger aka togggreturn 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? à+