3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ctiZG
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test1, !1 = $test2, !2 = $test3, !3 = $digits
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '07511+111111'
    4     1        ASSIGN                                                   !1, '%2B447511+111111'
    5     2        ASSIGN                                                   !2, '%2B44+%280%29+7511+111111'
    8     3        INIT_FCALL                                               'preg_match_all'
          4        SEND_VAL                                                 '%28%5B%5C%2B%5D%7B0%2C1%7D%5B0-9%2B%5D%29'
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !3
          7        DO_ICALL                                                 
    9     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.23 ms | 1385 KiB | 17 Q