3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $b = false; function __construct(&$oB) { $this->b = $oB; } } class B { public $a = false; function __construct(&$oA) { $this->a = $oA; } } $aDepends = false; //$pLink = &$aDepends; $oB = new B(false); $oA = new A($oB); //$aDepends=$oA; $oB->a = $oA; var_dump($oA); var_dump($oB);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v4Feq
function name:  (null)
number of ops:  18
compiled vars:  !0 = $aDepends, !1 = $oB, !2 = $oA
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, <false>
   19     1        NEW                                              $4      'B'
          2        SEND_VAL_EX                                              <false>
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   21     5        NEW                                              $7      'A'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $7
   24     9        ASSIGN_OBJ                                               !1, 'a'
         10        OP_DATA                                                  !2
   26    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   27    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v4Feq
function name:  __construct
number of ops:  4
compiled vars:  !0 = $oB
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_OBJ                                               'b'
          2        OP_DATA                                                  !0
    7     3      > RETURN                                                   null

End of function __construct

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v4Feq
function name:  __construct
number of ops:  4
compiled vars:  !0 = $oA
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'a'
          2        OP_DATA                                                  !0
   13     3      > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.46 ms | 1396 KiB | 15 Q