3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = '222-333-4545'; if (strlen($values) > 0 && !preg_match('/^[1]{0,1}-[0-9]{3}-[0-9]{3}-[0-9]{3,4}$/', $values)) { $err_msg[4] = ('Phone number must be in format xxx-nnn-nnnn.'); echo $err_msg[4]; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 10
filename:       /in/ACvv9
function name:  (null)
number of ops:  16
compiled vars:  !0 = $values, !1 = $err_msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '222-333-4545'
    3     1        STRLEN                                           ~3      !0
          2        IS_SMALLER                                       ~4      0, ~3
          3      > JMPZ_EX                                          ~4      ~4, ->10
          4    >   INIT_FCALL                                               'preg_match'
          5        SEND_VAL                                                 '%2F%5E%5B1%5D%7B0%2C1%7D-%5B0-9%5D%7B3%7D-%5B0-9%5D%7B3%7D-%5B0-9%5D%7B3%2C4%7D%24%2F'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        BOOL_NOT                                         ~6      $5
          9        BOOL                                             ~4      ~6
         10    > > JMPZ                                                     ~4, ->15
    4    11    >   ASSIGN_DIM                                               !1, 4
         12        OP_DATA                                                  'Phone+number+must+be+in+format+xxx-nnn-nnnn.'
    5    13        FETCH_DIM_R                                      ~8      !1, 4
         14        ECHO                                                     ~8
    6    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.25 ms | 1395 KiB | 15 Q