3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = "0123456789a123456789b123456789c"; //var_dump(strrpos($foo, '7', -5)); // Starts looking backwards five positions // from the end. Result: int(17) var_dump(strrpos($foo, '7', 20)); // Starts searching 20 positions into the // string. Result: int(27) //var_dump(strrpos($foo, '7', 1)); // Result: bool(false) ?>
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(27)
Output for 4.3.0 - 4.4.9
Warning: Wrong parameter count for strrpos() in /in/XU6Vm on line 7 NULL