Re: php5 beta3 preg_replace_callback() change?

From: Date: Mon, 22 Dec 2003 14:34:38 +0000
Subject: Re: php5 beta3 preg_replace_callback() change?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-6678@lists.php.net to get a copy of this message
> On Mon, Dec 22, 2003 at 05:32:53AM -0800, David Giffin wrote: >> I wanted to check if something changed in the preg_replace_callback() >> function. After going to beta3 we are now not able to make static >> object/method calls, that were working on beta2. Here is the error >> message: >> >> Warning: preg_replace_callback(): requires argument 2, >> 'self::replacePropertyCallback', to be a valid callback in >> /usr/local/phing/classes/phing/parser/ProjectConfigurator.php on line >> 202 > > Hi, using > preg_replace_callback($pattern, array($classname, $methodname), $subject) > works here in b3. That's the general notation for static method calls in > callbacks, afaik. > The call that is causing problems is a static call. Is this no longer possible? This is the line that is generating the above error: $sb = preg_replace_callback('/\$\{([^}]+)\}/', array('self', 'replacePropertyCallback'), $value); This was AFAIK the way to invoke methods in a static class. Perhaps we now need to specify classname rather than 'self'. Thanks, Hans

« previous php.internals (#6678) next »