3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MetaReflectionClass extends \ReflectionClass { public function getMethods($blah = \ReflectionMethod::IS_PRIVATE) { return call_user_func_array( array('parent', 'getMethods'), func_get_args() ); } } $mrc = new MetaReflectionClass('DateTime'); printf("Number of methods (no filter): %s\n", count($mrc->getMethods())); printf("Number of static methods: %s\n", count($mrc->getMethods(\ReflectionMethod::IS_STATIC)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hn9OJ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $mrc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'MetaReflectionClass'
          1        SEND_VAL_EX                                              'DateTime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        INIT_FCALL                                               'printf'
          5        SEND_VAL                                                 'Number+of+methods+%28no+filter%29%3A+%25s%0A'
          6        INIT_METHOD_CALL                                         !0, 'getMethods'
          7        DO_FCALL                                      0  $4      
          8        COUNT                                            ~5      $4
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
   17    11        INIT_FCALL                                               'printf'
         12        SEND_VAL                                                 'Number+of+static+methods%3A+%25s%0A'
         13        INIT_METHOD_CALL                                         !0, 'getMethods'
         14        SEND_VAL_EX                                              16
         15        DO_FCALL                                      0  $7      
         16        COUNT                                            ~8      $7
         17        SEND_VAL                                                 ~8
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class MetaReflectionClass:
Function getmethods:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hn9OJ
function name:  getMethods
number of ops:  8
compiled vars:  !0 = $blah
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      <const ast>
    8     1        INIT_USER_CALL                                0          'call_user_func_array', <array>
    9     2        FUNC_GET_ARGS                                    ~1      
          3        SEND_ARRAY                                               ~1
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      0  $2      
          6      > RETURN                                                   $2
   11     7*     > RETURN                                                   null

End of function getmethods

End of class MetaReflectionClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.81 ms | 1396 KiB | 15 Q