3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("DATA_PATH", "AAA"); class aaa { public static $b; public function __construct() { self::$b = DATA_PATH."BBB"; } } $t = new aaa(); echo $t::$b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jf6rf
function name:  (null)
number of ops:  11
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'DATA_PATH'
          2        SEND_VAL                                                 'AAA'
          3        DO_ICALL                                                 
   11     4        NEW                                              $2      'aaa'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   12     7        FETCH_CLASS                                   0  $5      !0
          8        FETCH_STATIC_PROP_R          unknown             ~6      'b'
          9        ECHO                                                     ~6
         10      > RETURN                                                   1

Class aaa:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jf6rf
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_CONSTANT                                   ~1      'DATA_PATH'
          1        CONCAT                                           ~2      ~1, 'BBB'
          2        ASSIGN_STATIC_PROP                                       'b'
          3        OP_DATA                                                  ~2
    8     4      > RETURN                                                   null

End of function __construct

End of class aaa.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.64 ms | 1451 KiB | 14 Q