3v4l.org

run code in 300+ PHP versions simultaneously
<?php $showError = false; class SomeClass { function SomeFunction($foo) { } } $foo[] = 'SomeClass'; $foo[] = 'SomeFunction'; var_dump($foo); if ($showError == true) { $bar[] = 'SomeClass'; $bar[] = &$foo[1]; } $reflection = new ReflectionParameter($foo, 'foo'); if ($showError) { //$reflection = new ReflectionParameter($bar, 'foo'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 16
filename:       /in/A18vh
function name:  (null)
number of ops:  23
compiled vars:  !0 = $showError, !1 = $foo, !2 = $bar, !3 = $reflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <false>
   10     1        ASSIGN_DIM                                               !1
          2        OP_DATA                                                  'SomeClass'
   11     3        ASSIGN_DIM                                               !1
          4        OP_DATA                                                  'SomeFunction'
   13     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   15     8        BOOL                                             ~8      !0
          9      > JMPZ                                                     ~8, ->16
   16    10    >   ASSIGN_DIM                                               !2
         11        OP_DATA                                                  'SomeClass'
   17    12        FETCH_DIM_W                                      $11     !1, 1
         13        MAKE_REF                                         $12     $11
         14        FETCH_DIM_W                                      $10     !2
         15        ASSIGN_REF                                               $10, $12
   20    16    >   NEW                                              $14     'ReflectionParameter'
         17        SEND_VAR_EX                                              !1
         18        SEND_VAL_EX                                              'foo'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !3, $14
   22    21      > JMPZ                                                     !0, ->22
   24    22    > > RETURN                                                   1

Class SomeClass:
Function somefunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A18vh
function name:  SomeFunction
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   null

End of function somefunction

End of class SomeClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.22 ms | 1396 KiB | 15 Q