> There are some weird questions that come up with that. For example, if an
> array item is an object that implements both __invoke() and __toString(),
> which should be fired? Is it a string? Or a callback? What if I pass a
> literal string "strlen", is that a callback, or a replacement?
You're r
ALeX,
On Mon, Apr 29, 2013 at 5:53 PM, ALeX wrote:
> what about patch preg_replace to accept callbacks?
>
> example:
> preg_replace(array(
> "/pattern1(.*)/",
> "/pattern2(.*)/"
>),
>array(
>function ($pat) { ... } ,
> "replace"
> )
> , ... );
>
>
The
On Tue, Apr 30, 2013 at 5:53 AM, ALeX wrote:
> what about patch preg_replace to accept callbacks?
>
> example:
> preg_replace(array(
> "/pattern1(.*)/",
> "/pattern2(.*)/"
>),
>array(
>function ($pat) { ... } ,
> "replace"
> )
> , ... );
>
Hey:
then
On Tue, Apr 30, 2013 at 1:43 AM, Nikita Popov wrote:
> On Mon, Apr 29, 2013 at 6:46 PM, Laruence wrote:
>
>> Hey:
>>there comes a FR: https://bugs.php.net/bug.php?id=64730
>>
>>the main idea is, in 5.5 we remove support of 'e' modifier.
>>
>>then comes a problem, the old codes(a real
what about patch preg_replace to accept callbacks?
example:
preg_replace(array(
"/pattern1(.*)/",
"/pattern2(.*)/"
),
array(
function ($pat) { ... } ,
"replace"
)
, ... );
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http
On Mon, Apr 29, 2013 at 6:46 PM, Laruence wrote:
> Hey:
>there comes a FR: https://bugs.php.net/bug.php?id=64730
>
>the main idea is, in 5.5 we remove support of 'e' modifier.
>
>then comes a problem, the old codes(a real use case see
> https://github.com/php/php-src/blob/PHP-5.4/Zend
发自我的 iPad
在 2013-4-30,1:09,Remi Collet 写道:
> Le 29/04/2013 18:46, Laruence a écrit :
>
>> so I propose to add a second argument to callback(aim to php-5.5.1),
>
> Seems a useful fix to this problem (also encounter elsewhere)
>
>> what do you think(of course, the second argument can also easil
Le 29/04/2013 18:46, Laruence a écrit :
>so I propose to add a second argument to callback(aim to php-5.5.1),
Seems a useful fix to this problem (also encounter elsewhere)
> what do you think(of course, the second argument can also easily change
> to be the regex idx in the regex array)?
Hey:
there comes a FR: https://bugs.php.net/bug.php?id=64730
the main idea is, in 5.5 we remove support of 'e' modifier.
then comes a problem, the old codes(a real use case see
https://github.com/php/php-src/blob/PHP-5.4/Zend/zend_vm_gen.php#L390):
preg_replace(array(
"/patt