3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! class A { public $b; public function A(B $b = null){ $this->b = $b; } } class B { public $a; public function B(A $a = null) { $this->a = $a; } } var_dump(new A(new B(new A())));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c3Y8W
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $0      'A'
          2        NEW                                              $1      'B'
          3        NEW                                              $2      'A'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $1
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function a

End of class A.

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

End of function b

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.45 ms | 1395 KiB | 15 Q