> 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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to