3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function x($x, $y) { var_dump('SUPER'); } } class Bar extends Foo { public function __call($name, $args) { call_user_func_array( [$this, $name], func_get_args() ); } } $bar = (new Bar)->x(4,2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQ15l
function name:  (null)
number of ops:  8
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'x'
          3        SEND_VAL_EX                                              4
          4        SEND_VAL_EX                                              2
          5        DO_FCALL                                      0  $3      
          6        ASSIGN                                                   !0, $3
          7      > RETURN                                                   1

Class Foo:
Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQ15l
function name:  x
number of ops:  6
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAL                                                 'SUPER'
          4        DO_ICALL                                                 
    6     5      > RETURN                                                   null

End of function x

End of class Foo.

Class Bar:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQ15l
function name:  __call
number of ops:  11
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        FETCH_THIS                                       ~2      
          3        INIT_ARRAY                                       ~3      ~2
          4        ADD_ARRAY_ELEMENT                                ~3      !0
          5        INIT_USER_CALL                                0          'call_user_func_array', ~3
   14     6        FUNC_GET_ARGS                                    ~4      
          7        SEND_ARRAY                                               ~4
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      0          
   16    10      > RETURN                                                   null

End of function __call

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQ15l
function name:  x
number of ops:  6
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAL                                                 'SUPER'
          4        DO_ICALL                                                 
    6     5      > RETURN                                                   null

End of function x

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
287.94 ms | 1400 KiB | 16 Q