3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = '9 - 1'; preg_match_all('/\d+/', $text, $out); var_dump(end($out[0])); $text = '5-3'; preg_match_all('/\d+/', $text, $out); var_dump(end($out[0]));
based on Al2qj
Output for 4.3.0 - 7.2.0
string(1) "1" string(1) "3"