3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Character { public function __construct($id = null) { } } $name = 'Character'; $arguments = array(); $reflect = new ReflectionClass($name); print_r($reflect); print_r($name); print_r($arguments); $o = $reflect->newInstanceArgs($arguments);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6cT6K
function name:  (null)
number of ops:  20
compiled vars:  !0 = $name, !1 = $arguments, !2 = $reflect, !3 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'Character'
   12     1        ASSIGN                                                   !1, <array>
   14     2        NEW                                              $6      'ReflectionClass'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $6
   15     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                                 
   16     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   17    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   19    15        INIT_METHOD_CALL                                         !2, 'newInstanceArgs'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $12     
         18        ASSIGN                                                   !3, $12
         19      > RETURN                                                   1

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

End of function __construct

End of class Character.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.55 ms | 1395 KiB | 15 Q