3v4l.org

run code in 300+ PHP versions simultaneously
<?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:
161.26 ms | 1395 KiB | 27 Q