Re: PHP_Compat, signature changes

From: Date: Sat, 28 May 2005 19:19:13 +0000
Subject: Re: PHP_Compat, signature changes
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37857@lists.php.net to get a copy of this message
On 5/28/2005 8:08 PM, Philippe Jausions spake the following words: > Daniel Convissor wrote: > >> Hey Aidan: >> >> On Sun, May 29, 2005 at 12:39:20AM +1000, Aidan Lister wrote: >> >>> There are a number of functions for which the function signature has >>> changed. For example, microtime now has an added boolean, mkdir has >>> a recursive switch, etc. >> > Daniel, > > The point is for existing functions that evolve over different > versions of PHP. You want to make the latest signature of a function > available to all previous PHP versions, whether or not that function > is already built-in. > > Aidan, > > I wouldn't recommend going with the underscore _microtime(), seems > risky for the future. > > I like: PHP_Compat_Component::microtime() and php_compat_microtime(). > Could we make them work hand in hand? However, that would break any application where PHP_Compat isn't available - and would seem to defeat the whole purpose. If you end up forcing people to use php implementations of native functions, it will come at the cost of speed... It's tough :) However, since you can't reimplement an existing function... As Phillip said, it would be good to have a regression-tested implementation of php functions that are not available across php versions. One thing that might be nice would be if php would natively offer a reimplementation override keyword... Pseudocode: <?php reimplement function mkdir($arg1, $arg2, ...) { .... } ?> Klaus

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