3v4l.org

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