3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("DATA_PATH", "AAA"); class a { public $b; public function __construct() { $this->b = DATA_PATH."BBB"; } } $t = new a(); echo $t->b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ML4Ce
function name:  (null)
number of ops:  10
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      'a'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   12     7        FETCH_OBJ_R                                      ~5      !0, 'b'
          8        ECHO                                                     ~5
          9      > RETURN                                                   1

Class a:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ML4Ce
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_OBJ                                               'b'
          3        OP_DATA                                                  ~2
    8     4      > RETURN                                                   null

End of function __construct

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.92 ms | 1010 KiB | 14 Q