3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class D { public $data = 'data'; } Class T { public $firstChild; function __construct(D $d) { $this->firstChild = $d; } } $d = new D; $item = new T($d); echo "$item->firstChild->data\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nlIb8
function name:  (null)
number of ops:  12
compiled vars:  !0 = $d, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'D'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        NEW                                              $5      'T'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   15     7        FETCH_OBJ_R                                      ~8      !1, 'firstChild'
          8        NOP                                                      
          9        FAST_CONCAT                                      ~9      ~8, '-%3Edata%0A'
         10        ECHO                                                     ~9
         11      > RETURN                                                   1

Class D: [no user functions]
Class T:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nlIb8
function name:  __construct
number of ops:  4
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               'firstChild'
          2        OP_DATA                                                  !0
   11     3      > RETURN                                                   null

End of function __construct

End of class T.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.3 ms | 1393 KiB | 13 Q