3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.78 ms | 1395 KiB | 15 Q