3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct(public &$a) {} } $foo = 42; $a = new A($foo); var_dump($a); $foo = 101; var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3V7DN
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 42
    8     1        NEW                                              $3      'A'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
    9     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   10     8        ASSIGN                                                   !0, 101
   11     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.61 ms | 1004 KiB | 14 Q