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); $digits = implode($digits[0]); var_dump($digits);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(11) "07511111111"