3v4l.org

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

Class a:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/td8D4
function name:  __construct
number of ops:  5
compiled vars:  !0 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        CONCAT                                           ~2      !0, '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:
150.93 ms | 1395 KiB | 15 Q