3v4l.org

run code in 300+ PHP versions simultaneously
<?php $legit_id = pack("CC", array(ord('3'), 0, 38)); var_dump(check_input_data($legit_id, 'int')); function check_input_data($data, $type) { if (preg_match('/^[0-9]{1,10}$/D', $data) && $data < 2147483647) return true; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VJY0p
function name:  (null)
number of ops:  16
compiled vars:  !0 = $legit_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'pack'
          1        SEND_VAL                                                 'CC'
          2        INIT_ARRAY                                       ~1      51
          3        ADD_ARRAY_ELEMENT                                ~1      0
          4        ADD_ARRAY_ELEMENT                                ~1      38
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !0, $2
    4     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL_BY_NAME                                       'check_input_data'
         10        SEND_VAR_EX                                              !0
         11        SEND_VAL_EX                                              'int'
         12        DO_FCALL                                      0  $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                                 
   10    15      > RETURN                                                   1

Function check_input_data:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/VJY0p
function name:  check_input_data
number of ops:  12
compiled vars:  !0 = $data, !1 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%5E%5B0-9%5D%7B1%2C10%7D%24%2FD'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > JMPZ_EX                                          ~3      $2, ->9
          7    >   IS_SMALLER                                       ~4      !0, 2147483647
          8        BOOL                                             ~3      ~4
          9    > > JMPZ                                                     ~3, ->11
    9    10    > > RETURN                                                   <true>
   10    11    > > RETURN                                                   null

End of function check_input_data

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.42 ms | 1388 KiB | 19 Q