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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.73 ms | 1395 KiB | 15 Q