3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 'aaa'; $b = 'ahoj aaa'; echo substr($b, 0, -strlen($a - 1)); echo "\n"; echo substr($b, 0, -strlen($a - 1));
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/lMUDH on line 5 ahoj a Warning: A non-numeric value encountered in /in/lMUDH on line 7 ahoj a
Output for 4.3.0 - 7.0.20
ahoj a ahoj a