3v4l.org

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

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
251.83 ms | 1395 KiB | 15 Q