3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aussie_mobiles = ['+614 1234 5678', '02 11112222', '(04)98765432', '0413572468', '+614 1 2 3 4 5 6 7 8']; foreach ($aussie_mobiles as $mob) { echo "$mob: "; if (preg_match('~^(?:\+614|\(04\)|04)(?: *\d){8}$~', $mob)) { echo "pass\n"; } else { echo "fail\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 15
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/uHOVM
function name:  (null)
number of ops:  17
compiled vars:  !0 = $aussie_mobiles, !1 = $mob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $3      !0, ->15
          2    > > FE_FETCH_R                                               $3, !1, ->15
    5     3    >   NOP                                                      
          4        FAST_CONCAT                                      ~4      !1, '%3A+'
          5        ECHO                                                     ~4
    6     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%7E%5E%28%3F%3A%5C%2B614%7C%5C%2804%5C%29%7C04%29%28%3F%3A+%2A%5Cd%29%7B8%7D%24%7E'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10      > JMPZ                                                     $5, ->13
    7    11    >   ECHO                                                     'pass%0A'
    6    12      > JMP                                                      ->14
    9    13    >   ECHO                                                     'fail%0A'
    4    14    > > JMP                                                      ->2
         15    >   FE_FREE                                                  $3
   11    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
131.81 ms | 1010 KiB | 14 Q