3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function get_numerics ($str) { preg_match_all('/\d+/', $str, $matches); sort($matches); return $matches[0]; } $one = "aclCheckDate('20050950', '==') or aclCheckDate('20050922', '==') or aclCheckDate('20050923', '==') or aclCheckDate('20050926', '==') or aclCheckDate('20050927', '==') or aclCheckDate('20050928', '==') or aclCheckDate('20050929', '==') or aclCheckDate('20050930', '==')"; print_r(get_numerics($one));
based on igpjh
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
Array ( [0] => 20050950 [1] => 20050922 [2] => 20050923 [3] => 20050926 [4] => 20050927 [5] => 20050928 [6] => 20050929 [7] => 20050930 )