3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public function test() { echo "Testing"; } } $a=array(); $a[0]=new TestClass(); $a[1]=new TestClass(); $b=$a[3]; if (isset($b)) echo $b->test(); else echo "element is not set";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZ66u
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
    9     1        NEW                                              $4      'TestClass'
          2        DO_FCALL                                      0          
          3        ASSIGN_DIM                                               !0, 0
          4        OP_DATA                                                  $4
   10     5        NEW                                              $7      'TestClass'
          6        DO_FCALL                                      0          
          7        ASSIGN_DIM                                               !0, 1
          8        OP_DATA                                                  $7
   12     9        FETCH_DIM_R                                      ~9      !0, 3
         10        ASSIGN                                                   !1, ~9
   13    11        ISSET_ISEMPTY_CV                                         !1
         12      > JMPZ                                                     ~11, ->17
         13    >   INIT_METHOD_CALL                                         !1, 'test'
         14        DO_FCALL                                      0  $12     
         15        ECHO                                                     $12
         16      > JMP                                                      ->18
   14    17    >   ECHO                                                     'element+is+not+set'
         18    > > RETURN                                                   1

Class TestClass:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZ66u
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'Testing'
    5     1      > RETURN                                                   null

End of function test

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.85 ms | 1385 KiB | 13 Q