3v4l.org

run code in 300+ PHP versions simultaneously
<?php function call($name, $method, $args, $ref, $context, $class) { var_dump($name, $method, $context, $class); return call_user_func_array(array($name, $method), $args); } class Foo_2e0af02066baec452cc22d76d0dbe2d7 { public static function foo() { return call('static', 'bar', array(), array(), @get_called_class(), __CLASS__); } } class Foo_dd0a956520946526fec64c726f93ed58 extends Foo_2e0af02066baec452cc22d76d0dbe2d7 { protected static function bar() { return __CLASS__; } } echo call('Foo_dd0a956520946526fec64c726f93ed58', 'foo', array(), array(), @get_called_class(), __CLASS__);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2kcdG
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                               'call'
          1        SEND_VAL                                                 'Foo_dd0a956520946526fec64c726f93ed58'
          2        SEND_VAL                                                 'foo'
          3        SEND_VAL                                                 <array>
          4        SEND_VAL                                                 <array>
          5        BEGIN_SILENCE                                    ~0      
          6        GET_CALLED_CLASS                                 ~1      
          7        END_SILENCE                                              ~0
          8        SEND_VAL                                                 ~1
          9        SEND_VAL                                                 ''
         10        DO_FCALL                                      0  $2      
         11        ECHO                                                     $2
         12      > RETURN                                                   1

Function call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2kcdG
function name:  call
number of ops:  20
compiled vars:  !0 = $name, !1 = $method, !2 = $args, !3 = $ref, !4 = $context, !5 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
          5        RECV                                             !5      
    4     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !4
         10        SEND_VAR                                                 !5
         11        DO_ICALL                                                 
    5    12        INIT_ARRAY                                       ~7      !0
         13        ADD_ARRAY_ELEMENT                                ~7      !1
         14        INIT_USER_CALL                                0          'call_user_func_array', ~7
         15        SEND_ARRAY                                               !2
         16        CHECK_UNDEF_ARGS                                         
         17        DO_FCALL                                      0  $8      
         18      > RETURN                                                   $8
    7    19*     > RETURN                                                   null

End of function call

Class Foo_2e0af02066baec452cc22d76d0dbe2d7:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2kcdG
function name:  foo
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'call'
          1        SEND_VAL                                                 'static'
          2        SEND_VAL                                                 'bar'
          3        SEND_VAL                                                 <array>
          4        SEND_VAL                                                 <array>
          5        BEGIN_SILENCE                                    ~0      
          6        GET_CALLED_CLASS                                 ~1      
          7        END_SILENCE                                              ~0
          8        SEND_VAL                                                 ~1
          9        SEND_VAL                                                 'Foo_2e0af02066baec452cc22d76d0dbe2d7'
         10        DO_FCALL                                      0  $2      
         11      > RETURN                                                   $2
   14    12*     > RETURN                                                   null

End of function foo

End of class Foo_2e0af02066baec452cc22d76d0dbe2d7.

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

End of function bar

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2kcdG
function name:  foo
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'call'
          1        SEND_VAL                                                 'static'
          2        SEND_VAL                                                 'bar'
          3        SEND_VAL                                                 <array>
          4        SEND_VAL                                                 <array>
          5        BEGIN_SILENCE                                    ~0      
          6        GET_CALLED_CLASS                                 ~1      
          7        END_SILENCE                                              ~0
          8        SEND_VAL                                                 ~1
          9        SEND_VAL                                                 'Foo_2e0af02066baec452cc22d76d0dbe2d7'
         10        DO_FCALL                                      0  $2      
         11      > RETURN                                                   $2
   14    12*     > RETURN                                                   null

End of function foo

End of class Foo_dd0a956520946526fec64c726f93ed58.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.13 ms | 1403 KiB | 18 Q