Re: str_replace does not like empty quotes [message #186321 is a reply to message #186320] |
Tue, 24 June 2014 19:53 |
Christoph Michael Bec
Messages: 207 Registered: June 2013
Karma:
|
Senior Member |
|
|
Denis McMahon wrote:
> On Tue, 24 Jun 2014 10:44:51 +0200, Arno Welzel wrote:
>
>> Am 2014-06-24 08:13, schrieb Olaf Schmitt:
>>
>>> Am 20.06.2014 01:33, schrieb richard:
>>>> $a=str_replace($a,"\","");
>>> $a=str_replace($a,"\\","");
>>
>> JFTR: The order is search, replace, subject and not subject, search,
>> replace.
>
> Yes, but richard is using his own definitions for search, replace and
> subject, which only align with the php in the 42nd alternative universe
> across.
Or maybe he's doing something like the following:
runkit_function_rename('str_replace', 'php_str_replace');
runkit_function_add(
'str_replace', '$subject, $search, $replace',
'return php_str_replace($search, $replace, $subject);'
);
echo str_replace('something', 'some', 'any');
SCNR.
--
Christoph M. Becker
|
|
|