3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function __construct() {} public function test() { print("Hey, I'm an instance of class A!"); } } $reflClass = new ReflectionClass(A::class); $instance = $reflClass->newInstanceWithoutConstructor(); $instance->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p30hh
function name:  (null)
number of ops:  10
compiled vars:  !0 = $reflClass, !1 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   12     4        INIT_METHOD_CALL                                         !0, 'newInstanceWithoutConstructor'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
   14     7        INIT_METHOD_CALL                                         !1, 'test'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function __construct

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p30hh
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'Hey%2C+I%27m+an+instance+of+class+A%21'
    8     1      > RETURN                                                   null

End of function test

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.02 ms | 1442 KiB | 13 Q