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-9+])', $test1, $digits); var_dump($digits);
Output for 5.2.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_match_all(): Compilation failed: nothing to repeat at offset 0 in /in/SYpRn on line 8 NULL
Output for hhvm-3.12.0
Warning: Compilation failed: nothing to repeat at offset 0 in /in/SYpRn on line -1 NULL
Output for hhvm-3.10.0
Warning: Compilation failed: nothing to repeat at offset 0 in /in/SYpRn on line 8 NULL
Output for 4.3.11 - 5.1.6
Warning: preg_match_all(): Compilation failed: nothing to repeat at offset 0 in /in/SYpRn on line 8 array(0) { }
Output for 4.3.0 - 4.3.10
Warning: Compilation failed: nothing to repeat at offset 0 in /in/SYpRn on line 8 array(0) { }