3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($id = null) { if (!$id) { return false; } $getArg = $id; if ($getArg (is_numeric($getArg) || $getArg === 'test')) { return true; } return false; } var_dump(test('1'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SXN5j
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'test'
          2        SEND_VAL                                                 '1'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/SXN5j
function name:  test
number of ops:  18
compiled vars:  !0 = $id, !1 = $getArg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
    5     1        BOOL_NOT                                         ~2      !0
          2      > JMPZ                                                     ~2, ->4
    6     3    > > RETURN                                                   <false>
    9     4    >   ASSIGN                                                   !1, !0
   10     5        INIT_DYNAMIC_CALL                                        !1
          6        INIT_FCALL                                               'is_numeric'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $4      
          9      > JMPNZ_EX                                         ~5      $4, ->12
         10    >   IS_IDENTICAL                                     ~6      !1, 'test'
         11        BOOL                                             ~5      ~6
         12    >   SEND_VAL_EX                                              ~5
         13        DO_FCALL                                      0  $7      
         14      > JMPZ                                                     $7, ->16
   11    15    > > RETURN                                                   <true>
   14    16    > > RETURN                                                   <false>
   15    17*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
207.37 ms | 1403 KiB | 18 Q