3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { protected static $foo = array ( 1, 5, 9 ); public function printFoo() { print_r(self::$foo); } public function doThing() { $foos = self::$foo; $foos[] = 12; return $foos; } } $f = new foo(); $f->printFoo(); print_r($f->doThing()); $f->printFoo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q2Bop
function name:  (null)
number of ops:  13
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'printFoo'
          4        DO_FCALL                                      0          
   25     5        INIT_FCALL                                               'print_r'
          6        INIT_METHOD_CALL                                         !0, 'doThing'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
   26    10        INIT_METHOD_CALL                                         !0, 'printFoo'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class foo:
Function printfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q2Bop
function name:  printFoo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'print_r'
          1        FETCH_STATIC_PROP_R          global lock         ~0      'foo'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   null

End of function printfoo

Function dothing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q2Bop
function name:  doThing
number of ops:  6
compiled vars:  !0 = $foos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_STATIC_PROP_R          unknown             ~1      'foo'
          1        ASSIGN                                                   !0, ~1
   17     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  12
   18     4      > RETURN                                                   !0
   19     5*     > RETURN                                                   null

End of function dothing

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.39 ms | 1396 KiB | 15 Q