3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Char; 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/sfdFb
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
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 'Character'
   14     1        ASSIGN                                                   !1, <array>
   16     2        NEW                                              $6      'ReflectionClass'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $6
   17     6        INIT_NS_FCALL_BY_NAME                                    'Char%5Cprint_r'
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0          
   18     9        INIT_NS_FCALL_BY_NAME                                    'Char%5Cprint_r'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
   19    12        INIT_NS_FCALL_BY_NAME                                    'Char%5Cprint_r'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
   21    15        INIT_METHOD_CALL                                         !2, 'newInstanceArgs'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $12     
         18        ASSIGN                                                   !3, $12
         19      > RETURN                                                   1

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

End of function __construct

End of class Char\Character.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.61 ms | 1395 KiB | 15 Q