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.6
Warning: A non-numeric value encountered in /in/v4p3t on line 5 ahoj a ahoj
Output for 4.3.0 - 7.0.20
ahoj a ahoj