3v4l.org

run code in 300+ PHP versions simultaneously
<?php function call_user_func_fixed() { // Not much point in writing all that logic out twice, just require that both fixer functions are present $args = func_get_args(); $callable = array_shift($args); return call_user_func_array_fixed($callable, $args); } function call_user_func_array_fixed($callable, $args) { var_dump(debug_backtrace()); $isStaticMethod = false; // Normalize the $callable and see if it looks like a static method if (is_object($callable) && $callable instanceof Closure) { $func = $callable; } else if (is_string($callable)) { $expr = '/^([a-z_\x7f-\xff][\w\x7f-\xff]*)::([a-z_\x7f-\xff][\w\x7f-\xff]*)$/i'; if (preg_match($expr, $callable, $matches)) { $func = array($matches[1], $matches[2]); $isStaticMethod = true; } else { $func = $callable; } } else if (is_array($callable) && isset($callable[0], $callable[1]) && count($callable) === 2) { if (is_object($callable[0])) { $func = $callable; } else if (is_string($callable[0])) { $func = $callable; $isStaticMethod = true; } } // If it's not a valid callable give up here if (!isset($callable) || (!$isStaticMethod && !is_callable($callable))) { trigger_error('call_user_func() expects parameter 1 to be a valid callback', E_USER_WARNING); return null; } // If it's not a static method use the regular mechanism if (!$isStaticMethod) { return call_user_func_array($func, $args); } // Get some info about how we were called $backtrace = debug_backtrace(); // passing args here is fraught with complications for backwards compat :-( if ($backtrace[1]['function'] === 'call_user_func_fixed') { $called = 'call_user_func_fixed'; $contextClass = !empty($backtrace[2]['class']) ? $backtrace[2]['class'] : null; } else { $called = 'call_user_func_array_fixed'; $contextClass = !empty($backtrace[1]['class']) ? $backtrace[1]['class'] : null; } $key = $backtrace[1]['function'] === 'call_user_func_fixed' ? 2 : 1; // Get a reference to the target static method if possible try { if ($func[0] === 'self') { if (!$contextClass) { throw new Exception('Use of self in an invalid context'); } $class = new ReflectionClass($contextClass); $method = $class->getMethod($func[1]); if ($method->isPrivate()) { if ($method->getDeclaringClass()->getName() !== $contextClass || !method_exists($method, 'setAccessible')) { throw new Exception('Attempting to call private method in an invalid context'); } $method->setAccessible(true); } else if ($method->isProtected()) { if (!method_exists($method, 'setAccessible')) { throw new Exception('Attempting to call protected method in an invalid context'); } while ($class->getName() !== $contextClass) { $class = $class->getParentClass(); } if ($class->getName() !== $contextClass) { throw new Exception('Attempting to call protected method in an invalid context'); } $method->setAccessible(true); } } else if ($func[0] === 'static' && function_exists('get_called_class')) { $class = new ReflectionClass(get_called_class()); $method = $class->getMethod($func[1]); } else { $class = new ReflectionClass($func[0]); $method = $class->getMethod($func[1]); } // Invoke the method with the passed arguments and return the result return $method->invokeArgs(null, $args); } catch (Exception $e) { trigger_error('call_user_func*() expects parameter 1 to be a valid callback: ' . $e->getMessage(), E_USER_WARNING); return null; } // Invoke the method with the passed arguments and return the result return $method->invokeArgs(null, $args); } class Car { public function run() { return call_user_func_fixed('static::getName'); // should call toyota } private static function getName() { return 'Car'; } } class Toyota extends Car { public static function getName() { return 'Toyota'; } } $car = new Car(); echo $car->run(); //Car instead of Toyota $toyota = new Toyota(); echo $toyota->run(); //Car instead of Toyota
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HSTfC
function name:  (null)
number of ops:  13
compiled vars:  !0 = $car, !1 = $toyota
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  124     0  E >   NEW                                              $2      'Car'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
  125     3        INIT_METHOD_CALL                                         !0, 'run'
          4        DO_FCALL                                      0  $5      
          5        ECHO                                                     $5
  127     6        NEW                                              $6      'Toyota'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
  128     9        INIT_METHOD_CALL                                         !1, 'run'
         10        DO_FCALL                                      0  $9      
         11        ECHO                                                     $9
         12      > RETURN                                                   1

Function call_user_func_fixed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HSTfC
function name:  call_user_func_fixed
number of ops:  12
compiled vars:  !0 = $args, !1 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FUNC_GET_ARGS                                    ~2      
          1        ASSIGN                                                   !0, ~2
    7     2        INIT_FCALL                                               'array_shift'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    9     6        INIT_FCALL_BY_NAME                                       'call_user_func_array_fixed'
          7        SEND_VAR_EX                                              !1
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $6      
         10      > RETURN                                                   $6
   10    11*     > RETURN                                                   null

End of function call_user_func_fixed

Function call_user_func_array_fixed:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
2 jumps found. (Code = 47) Position 1 = 58, Position 2 = 66
Branch analysis from position: 58
2 jumps found. (Code = 46) Position 1 = 60, Position 2 = 65
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 67, Position 2 = 72
Branch analysis from position: 67
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 74, Position 2 = 79
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 79
2 jumps found. (Code = 43) Position 1 = 86, Position 2 = 98
Branch analysis from position: 86
2 jumps found. (Code = 43) Position 1 = 91, Position 2 = 95
Branch analysis from position: 91
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
1 jumps found. (Code = 42) Position 1 = 109
Branch analysis from position: 109
2 jumps found. (Code = 43) Position 1 = 113, Position 2 = 115
Branch analysis from position: 113
1 jumps found. (Code = 42) Position 1 = 116
Branch analysis from position: 116
2 jumps found. (Code = 43) Position 1 = 120, Position 2 = 193
Branch analysis from position: 120
2 jumps found. (Code = 43) Position 1 = 122, Position 2 = 126
Branch analysis from position: 122
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 126
2 jumps found. (Code = 43) Position 1 = 139, Position 2 = 160
Branch analysis from position: 139
2 jumps found. (Code = 47) Position 1 = 145, Position 2 = 151
Branch analysis from position: 145
2 jumps found. (Code = 43) Position 1 = 152, Position 2 = 156
Branch analysis from position: 152
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 156
1 jumps found. (Code = 42) Position 1 = 192
Branch analysis from position: 192
1 jumps found. (Code = 42) Position 1 = 225
Branch analysis from position: 225
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 151
Branch analysis from position: 160
2 jumps found. (Code = 43) Position 1 = 163, Position 2 = 192
Branch analysis from position: 163
2 jumps found. (Code = 43) Position 1 = 169, Position 2 = 173
Branch analysis from position: 169
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 173
1 jumps found. (Code = 42) Position 1 = 177
Branch analysis from position: 177
2 jumps found. (Code = 44) Position 1 = 181, Position 2 = 174
Branch analysis from position: 181
2 jumps found. (Code = 43) Position 1 = 185, Position 2 = 189
Branch analysis from position: 185
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 189
1 jumps found. (Code = 42) Position 1 = 225
Branch analysis from position: 225
Branch analysis from position: 174
2 jumps found. (Code = 44) Position 1 = 181, Position 2 = 174
Branch analysis from position: 181
Branch analysis from position: 174
Branch analysis from position: 192
Branch analysis from position: 193
2 jumps found. (Code = 46) Position 1 = 196, Position 2 = 200
Branch analysis from position: 196
2 jumps found. (Code = 43) Position 1 = 201, Position 2 = 213
Branch analysis from position: 201
1 jumps found. (Code = 42) Position 1 = 225
Branch analysis from position: 225
Branch analysis from position: 213
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 200
Branch analysis from position: 115
2 jumps found. (Code = 43) Position 1 = 120, Position 2 = 193
Branch analysis from position: 120
Branch analysis from position: 193
Branch analysis from position: 95
1 jumps found. (Code = 42) Position 1 = 109
Branch analysis from position: 109
Branch analysis from position: 98
2 jumps found. (Code = 43) Position 1 = 103, Position 2 = 107
Branch analysis from position: 103
1 jumps found. (Code = 42) Position 1 = 108
Branch analysis from position: 108
2 jumps found. (Code = 43) Position 1 = 113, Position 2 = 115
Branch analysis from position: 113
Branch analysis from position: 115
Branch analysis from position: 107
2 jumps found. (Code = 43) Position 1 = 113, Position 2 = 115
Branch analysis from position: 113
Branch analysis from position: 115
Branch analysis from position: 65
Branch analysis from position: 66
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 33
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 31
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
Branch analysis from position: 33
2 jumps found. (Code = 46) Position 1 = 35, Position 2 = 40
Branch analysis from position: 35
2 jumps found. (Code = 46) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
2 jumps found. (Code = 46) Position 1 = 41, Position 2 = 44
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 55
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 50
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 55
Branch analysis from position: 53
2 jumps found. (Code = 47) Position 1 = 58, Position 2 = 66
Branch analysis from position: 58
Branch analysis from position: 66
Branch analysis from position: 55
Branch analysis from position: 55
Branch analysis from position: 44
Branch analysis from position: 39
Branch analysis from position: 40
Branch analysis from position: 12
Found catch point at position: 231
Branch analysis from position: 231
2 jumps found. (Code = 107) Position 1 = 232, Position 2 = -2
Branch analysis from position: 232
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HSTfC
function name:  call_user_func_array_fixed
number of ops:  246
compiled vars:  !0 = $callable, !1 = $args, !2 = $isStaticMethod, !3 = $func, !4 = $expr, !5 = $matches, !6 = $backtrace, !7 = $called, !8 = $contextClass, !9 = $key, !10 = $class, !11 = $method, !12 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'debug_backtrace'
          4        DO_ICALL                                         $13     
          5        SEND_VAR                                                 $13
          6        DO_ICALL                                                 
   15     7        ASSIGN                                                   !2, <false>
   18     8        TYPE_CHECK                                  256  ~16     !0
          9      > JMPZ_EX                                          ~16     ~16, ->12
         10    >   INSTANCEOF                                       ~17     !0, 'Closure'
         11        BOOL                                             ~16     ~17
         12    > > JMPZ                                                     ~16, ->15
   19    13    >   ASSIGN                                                   !3, !0
         14      > JMP                                                      ->55
   20    15    >   TYPE_CHECK                                   64          !0
         16      > JMPZ                                                     ~19, ->33
   21    17    >   ASSIGN                                                   !4, '%2F%5E%28%5Ba-z_%5Cx7f-%5Cxff%5D%5B%5Cw%5Cx7f-%5Cxff%5D%2A%29%3A%3A%28%5Ba-z_%5Cx7f-%5Cxff%5D%5B%5Cw%5Cx7f-%5Cxff%5D%2A%29%24%2Fi'
   22    18        INIT_FCALL                                               'preg_match'
         19        SEND_VAR                                                 !4
         20        SEND_VAR                                                 !0
         21        SEND_REF                                                 !5
         22        DO_ICALL                                         $21     
         23      > JMPZ                                                     $21, ->31
   23    24    >   FETCH_DIM_R                                      ~22     !5, 1
         25        INIT_ARRAY                                       ~23     ~22
         26        FETCH_DIM_R                                      ~24     !5, 2
         27        ADD_ARRAY_ELEMENT                                ~23     ~24
         28        ASSIGN                                                   !3, ~23
   24    29        ASSIGN                                                   !2, <true>
         30      > JMP                                                      ->32
   26    31    >   ASSIGN                                                   !3, !0
         32    > > JMP                                                      ->55
   28    33    >   TYPE_CHECK                                  128  ~28     !0
         34      > JMPZ_EX                                          ~28     ~28, ->40
         35    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~29     !0, 0
         36      > JMPZ_EX                                          ~29     ~29, ->39
         37    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~30     !0, 1
         38        BOOL                                             ~29     ~30
         39    >   BOOL                                             ~28     ~29
         40    > > JMPZ_EX                                          ~28     ~28, ->44
         41    >   COUNT                                            ~31     !0
         42        IS_IDENTICAL                                     ~32     ~31, 2
         43        BOOL                                             ~28     ~32
         44    > > JMPZ                                                     ~28, ->55
   29    45    >   FETCH_DIM_R                                      ~33     !0, 0
         46        TYPE_CHECK                                  256          ~33
         47      > JMPZ                                                     ~34, ->50
   30    48    >   ASSIGN                                                   !3, !0
         49      > JMP                                                      ->55
   31    50    >   FETCH_DIM_R                                      ~36     !0, 0
         51        TYPE_CHECK                                   64          ~36
         52      > JMPZ                                                     ~37, ->55
   32    53    >   ASSIGN                                                   !3, !0
   33    54        ASSIGN                                                   !2, <true>
   38    55    >   ISSET_ISEMPTY_CV                                 ~40     !0
         56        BOOL_NOT                                         ~41     ~40
         57      > JMPNZ_EX                                         ~41     ~41, ->66
         58    >   BOOL_NOT                                         ~42     !2
         59      > JMPZ_EX                                          ~42     ~42, ->65
         60    >   INIT_FCALL                                               'is_callable'
         61        SEND_VAR                                                 !0
         62        DO_ICALL                                         $43     
         63        BOOL_NOT                                         ~44     $43
         64        BOOL                                             ~42     ~44
         65    >   BOOL                                             ~41     ~42
         66    > > JMPZ                                                     ~41, ->72
   39    67    >   INIT_FCALL                                               'trigger_error'
         68        SEND_VAL                                                 'call_user_func%28%29+expects+parameter+1+to+be+a+valid+callback'
         69        SEND_VAL                                                 512
         70        DO_ICALL                                                 
   40    71      > RETURN                                                   null
   44    72    >   BOOL_NOT                                         ~46     !2
         73      > JMPZ                                                     ~46, ->79
   45    74    >   INIT_USER_CALL                                0          'call_user_func_array', !3
         75        SEND_ARRAY                                               !1
         76        CHECK_UNDEF_ARGS                                         
         77        DO_FCALL                                      0  $47     
         78      > RETURN                                                   $47
   49    79    >   INIT_FCALL                                               'debug_backtrace'
         80        DO_ICALL                                         $48     
         81        ASSIGN                                                   !6, $48
   50    82        FETCH_DIM_R                                      ~50     !6, 1
         83        FETCH_DIM_R                                      ~51     ~50, 'function'
         84        IS_IDENTICAL                                             ~51, 'call_user_func_fixed'
         85      > JMPZ                                                     ~52, ->98
   51    86    >   ASSIGN                                                   !7, 'call_user_func_fixed'
   52    87        FETCH_DIM_IS                                     ~54     !6, 2
         88        ISSET_ISEMPTY_DIM_OBJ                         1  ~55     ~54, 'class'
         89        BOOL_NOT                                         ~56     ~55
         90      > JMPZ                                                     ~56, ->95
         91    >   FETCH_DIM_R                                      ~57     !6, 2
         92        FETCH_DIM_R                                      ~58     ~57, 'class'
         93        QM_ASSIGN                                        ~59     ~58
         94      > JMP                                                      ->96
         95    >   QM_ASSIGN                                        ~59     null
         96    >   ASSIGN                                                   !8, ~59
         97      > JMP                                                      ->109
   54    98    >   ASSIGN                                                   !7, 'call_user_func_array_fixed'
   55    99        FETCH_DIM_IS                                     ~62     !6, 1
        100        ISSET_ISEMPTY_DIM_OBJ                         1  ~63     ~62, 'class'
        101        BOOL_NOT                                         ~64     ~63
        102      > JMPZ                                                     ~64, ->107
        103    >   FETCH_DIM_R                                      ~65     !6, 1
        104        FETCH_DIM_R                                      ~66     ~65, 'class'
        105        QM_ASSIGN                                        ~67     ~66
        106      > JMP                                                      ->108
        107    >   QM_ASSIGN                                        ~67     null
        108    >   ASSIGN                                                   !8, ~67
   57   109    >   FETCH_DIM_R                                      ~69     !6, 1
        110        FETCH_DIM_R                                      ~70     ~69, 'function'
        111        IS_IDENTICAL                                             ~70, 'call_user_func_fixed'
        112      > JMPZ                                                     ~71, ->115
        113    >   QM_ASSIGN                                        ~72     2
        114      > JMP                                                      ->116
        115    >   QM_ASSIGN                                        ~72     1
        116    >   ASSIGN                                                   !9, ~72
   61   117        FETCH_DIM_R                                      ~74     !3, 0
        118        IS_IDENTICAL                                             ~74, 'self'
        119      > JMPZ                                                     ~75, ->193
   62   120    >   BOOL_NOT                                         ~76     !8
        121      > JMPZ                                                     ~76, ->126
   63   122    >   NEW                                              $77     'Exception'
        123        SEND_VAL_EX                                              'Use+of+self+in+an+invalid+context'
        124        DO_FCALL                                      0          
        125      > THROW                                         0          $77
   66   126    >   NEW                                              $79     'ReflectionClass'
        127        SEND_VAR_EX                                              !8
        128        DO_FCALL                                      0          
        129        ASSIGN                                                   !10, $79
   67   130        INIT_METHOD_CALL                                         !10, 'getMethod'
        131        CHECK_FUNC_ARG                                           
        132        FETCH_DIM_FUNC_ARG                               $82     !3, 1
        133        SEND_FUNC_ARG                                            $82
        134        DO_FCALL                                      0  $83     
        135        ASSIGN                                                   !11, $83
   69   136        INIT_METHOD_CALL                                         !11, 'isPrivate'
        137        DO_FCALL                                      0  $85     
        138      > JMPZ                                                     $85, ->160
   70   139    >   INIT_METHOD_CALL                                         !11, 'getDeclaringClass'
        140        DO_FCALL                                      0  $86     
        141        INIT_METHOD_CALL                                         $86, 'getName'
        142        DO_FCALL                                      0  $87     
        143        IS_NOT_IDENTICAL                                 ~88     !8, $87
        144      > JMPNZ_EX                                         ~88     ~88, ->151
   71   145    >   INIT_FCALL                                               'method_exists'
        146        SEND_VAR                                                 !11
        147        SEND_VAL                                                 'setAccessible'
        148        DO_ICALL                                         $89     
        149        BOOL_NOT                                         ~90     $89
        150        BOOL                                             ~88     ~90
        151    > > JMPZ                                                     ~88, ->156
   72   152    >   NEW                                              $91     'Exception'
        153        SEND_VAL_EX                                              'Attempting+to+call+private+method+in+an+invalid+context'
        154        DO_FCALL                                      0          
        155      > THROW                                         0          $91
   75   156    >   INIT_METHOD_CALL                                         !11, 'setAccessible'
        157        SEND_VAL_EX                                              <true>
        158        DO_FCALL                                      0          
        159      > JMP                                                      ->192
   76   160    >   INIT_METHOD_CALL                                         !11, 'isProtected'
        161        DO_FCALL                                      0  $94     
        162      > JMPZ                                                     $94, ->192
   77   163    >   INIT_FCALL                                               'method_exists'
        164        SEND_VAR                                                 !11
        165        SEND_VAL                                                 'setAccessible'
        166        DO_ICALL                                         $95     
        167        BOOL_NOT                                         ~96     $95
        168      > JMPZ                                                     ~96, ->173
   78   169    >   NEW                                              $97     'Exception'
        170        SEND_VAL_EX                                              'Attempting+to+call+protected+method+in+an+invalid+context'
        171        DO_FCALL                                      0          
        172      > THROW                                         0          $97
   81   173    > > JMP                                                      ->177
   82   174    >   INIT_METHOD_CALL                                         !10, 'getParentClass'
        175        DO_FCALL                                      0  $99     
        176        ASSIGN                                                   !10, $99
   81   177    >   INIT_METHOD_CALL                                         !10, 'getName'
        178        DO_FCALL                                      0  $101    
        179        IS_NOT_IDENTICAL                                         !8, $101
        180      > JMPNZ                                                    ~102, ->174
   84   181    >   INIT_METHOD_CALL                                         !10, 'getName'
        182        DO_FCALL                                      0  $103    
        183        IS_NOT_IDENTICAL                                         !8, $103
        184      > JMPZ                                                     ~104, ->189
   85   185    >   NEW                                              $105    'Exception'
        186        SEND_VAL_EX                                              'Attempting+to+call+protected+method+in+an+invalid+context'
        187        DO_FCALL                                      0          
        188      > THROW                                         0          $105
   88   189    >   INIT_METHOD_CALL                                         !11, 'setAccessible'
        190        SEND_VAL_EX                                              <true>
        191        DO_FCALL                                      0          
        192    > > JMP                                                      ->225
   90   193    >   FETCH_DIM_R                                      ~108    !3, 0
        194        IS_IDENTICAL                                     ~109    ~108, 'static'
        195      > JMPZ_EX                                          ~109    ~109, ->200
        196    >   INIT_FCALL                                               'function_exists'
        197        SEND_VAL                                                 'get_called_class'
        198        DO_ICALL                                         $110    
        199        BOOL                                             ~109    $110
        200    > > JMPZ                                                     ~109, ->213
   91   201    >   NEW                                              $111    'ReflectionClass'
        202        GET_CALLED_CLASS                                 ~112    
        203        SEND_VAL_EX                                              ~112
        204        DO_FCALL                                      0          
        205        ASSIGN                                                   !10, $111
   92   206        INIT_METHOD_CALL                                         !10, 'getMethod'
        207        CHECK_FUNC_ARG                                           
        208        FETCH_DIM_FUNC_ARG                               $115    !3, 1
        209        SEND_FUNC_ARG                                            $115
        210        DO_FCALL                                      0  $116    
        211        ASSIGN                                                   !11, $116
        212      > JMP                                                      ->225
   94   213    >   NEW                                              $118    'ReflectionClass'
        214        CHECK_FUNC_ARG                                           
        215        FETCH_DIM_FUNC_ARG                               $119    !3, 0
        216        SEND_FUNC_ARG                                            $119
        217        DO_FCALL                                      0          
        218        ASSIGN                                                   !10, $118
   95   219        INIT_METHOD_CALL                                         !10, 'getMethod'
        220        CHECK_FUNC_ARG                                           
        221        FETCH_DIM_FUNC_ARG                               $122    !3, 1
        222        SEND_FUNC_ARG                                            $122
        223        DO_FCALL                                      0  $123    
        224        ASSIGN                                                   !11, $123
   99   225    >   INIT_METHOD_CALL                                         !11, 'invokeArgs'
        226        SEND_VAL_EX                                              null
        227        SEND_VAR_EX                                              !1
        228        DO_FCALL                                      0  $125    
        229      > RETURN                                                   $125
        230*       JMP                                                      ->240
  100   231  E > > CATCH                                       last         'Exception'
  101   232    >   INIT_FCALL                                               'trigger_error'
        233        INIT_METHOD_CALL                                         !12, 'getMessage'
        234        DO_FCALL                                      0  $126    
        235        CONCAT                                           ~127    'call_user_func%2A%28%29+expects+parameter+1+to+be+a+valid+callback%3A+', $126
        236        SEND_VAL                                                 ~127
        237        SEND_VAL                                                 512
        238        DO_ICALL                                                 
  102   239      > RETURN                                                   null
  106   240*       INIT_METHOD_CALL                                         !11, 'invokeArgs'
        241*       SEND_VAL_EX                                              null
        242*       SEND_VAR_EX                                              !1
        243*       DO_FCALL                                      0  $129    
        244*       RETURN                                                   $129
  107   245*     > RETURN                                                   null

End of function call_user_func_array_fixed

Class Car:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HSTfC
function name:  run
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  111     0  E >   INIT_FCALL                                               'call_user_func_fixed'
          1        SEND_VAL                                                 'static%3A%3AgetName'
          2        DO_FCALL                                      0  $0      
          3      > RETURN                                                   $0
  112     4*     > RETURN                                                   null

End of function run

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HSTfC
function name:  getName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  114     0  E > > RETURN                                                   'Car'
  115     1*     > RETURN                                                   null

End of function getname

End of class Car.

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

End of function getname

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.41 ms | 1431 KiB | 30 Q