3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; class Bar { private function baz(){}} $class = new \ReflectionClass('Foo\Bar'); $method = $class->getMethod('baz'); echo $method->getName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OQuES
function name:  (null)
number of ops:  12
compiled vars:  !0 = $class, !1 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Foo%5CBar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    9     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              'baz'
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
   11     8        INIT_METHOD_CALL                                         !1, 'getName'
          9        DO_FCALL                                      0  $7      
         10        ECHO                                                     $7
         11      > RETURN                                                   1

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

End of function baz

End of class Foo\Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.38 ms | 1393 KiB | 13 Q