3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test1 = '07511 111111'; $test2 = '+447511 111111'; $test3 = '+44 (0) 7511 111111'; //step 1 - reduce it to digits: preg_match_all('([\+]{0,1}[0-9+])', $test1, $digits); var_dump($digits);
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> array(11) { [0]=> string(1) "0" [1]=> string(1) "7" [2]=> string(1) "5" [3]=> string(1) "1" [4]=> string(1) "1" [5]=> string(1) "1" [6]=> string(1) "1" [7]=> string(1) "1" [8]=> string(1) "1" [9]=> string(1) "1" [10]=> string(1) "1" } }
Output for hhvm-3.10.0

Process exited with code 153.