3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = new Test; print_r($test::holder); class Test { public static $holder = array('test' => 'item'); public static function method() { //print_r(self::holder); //Test::holder = array('one' => 'item'); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P2vYC
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    5     3        INIT_FCALL                                               'print_r'
          4        FETCH_CLASS                                   0  $4      !0
          5        FETCH_CLASS_CONSTANT                             ~5      $4, 'holder'
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                                 
   17     8      > RETURN                                                   1

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

End of function method

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.79 ms | 1394 KiB | 15 Q