3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* $str = 'test1234'; preg_match_all('!\d+!', $str, $matches);*/ /*for ($matches = 0; $matches <9; $matches++) { $letters = range('a','j'); var_dump($letters[$matches]); } $str = 'test1234'; $int = filter_var($str, FILTER_SANITIZE_NUMBER_INT); var_dump($str);*/ $string = "12312313sdfsdf24234"; preg_match_all('!\d+!',$string,$matches); preg_match_all('/([a-zA-Z]+)/',$string,$str); print_r($matches); print_r($str);
based on 9XPa7
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
Array ( [0] => Array ( [0] => 12312313 [1] => 24234 ) ) Array ( [0] => Array ( [0] => sdfsdf ) [1] => Array ( [0] => sdfsdf ) )