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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.2 ms | 1420 KiB | 27 Q