3v4l.org

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

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

End of function __construct

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.4 ms | 1906 KiB | 13 Q