3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phone_number = '+380936109511'; $phone_number = '093610911'; $phone_number = 'wtf'; if ( ! preg_match('/\s\d{12}/', $phone_number) && ! preg_match('/\d{10}/', $phone_number)) { throw new Exception('Not valid phone number format'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/MRsjC
function name:  (null)
number of ops:  21
compiled vars:  !0 = $phone_number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2B380936109511'
    4     1        ASSIGN                                                   !0, '093610911'
    5     2        ASSIGN                                                   !0, 'wtf'
    7     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5Cs%5Cd%7B12%7D%2F'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        BOOL_NOT                                         ~5      $4
          8      > JMPZ_EX                                          ~5      ~5, ->15
          9    >   INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2F%5Cd%7B10%7D%2F'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        BOOL_NOT                                         ~7      $6
         14        BOOL                                             ~5      ~7
         15    > > JMPZ                                                     ~5, ->20
    9    16    >   NEW                                              $8      'Exception'
         17        SEND_VAL_EX                                              'Not+valid+phone+number+format'
         18        DO_FCALL                                      0          
         19      > THROW                                         0          $8
   10    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.44 ms | 1395 KiB | 15 Q