3v4l.org

run code in 150+ 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
Warning: A non-numeric value encountered in /in/v4p3t on line 5 ahoj a ahoj
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.0.14
ahoj a ahoj