3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Hello { public function sayHelloTo($name) { return 'Hello ' . $name; } } class HelloWorld extends Hello { public function sayHelloTo($name) { return 'Hello world: ' . $name; } } $reflectionMethod = new ReflectionMethod('HelloWorld', 'sayHelloTo'); var_dump($reflectionMethod); var_dump($reflectionMethod->getPrototype());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LUXqt
function name:  (null)
number of ops:  14
compiled vars:  !0 = $reflectionMethod
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'HelloWorld'
          2        SEND_VAL_EX                                              'sayHelloTo'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   18     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   19     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'getPrototype'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Hello:
Function sayhelloto:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LUXqt
function name:  sayHelloTo
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        CONCAT                                           ~1      'Hello+', !0
          2      > RETURN                                                   ~1
    6     3*     > RETURN                                                   null

End of function sayhelloto

End of class Hello.

Class HelloWorld:
Function sayhelloto:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LUXqt
function name:  sayHelloTo
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        CONCAT                                           ~1      'Hello+world%3A+', !0
          2      > RETURN                                                   ~1
   13     3*     > RETURN                                                   null

End of function sayhelloto

End of class HelloWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.57 ms | 1396 KiB | 15 Q