<?php
$a='I love you';
echo str_replace_first('z','ea',$a);
function str_replace_first($this,$that,$where)
{
return substr($where,0,strpos($where,$this)).
$that.
substr($where,strpos($where,$this)+strlen($this));
}
- Output for 7.1.25, 7.2.0 - 7.2.15, 7.3.0 - 7.3.2
- Fatal error: Cannot use $this as parameter in /in/cMeZj on line 5
Process exited with code 255.
preferences:
151.82 ms | 996 KiB | 7 Q