3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected function bar() { var_dump(func_get_args()); } public function __call($method, $args) { array_unshift($args, $method); $this->bar(...$args); } } (new Foo)->derp('this','is','an','example','of','variadics');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T0OYf
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'derp'
          3        SEND_VAL_EX                                              'this'
          4        SEND_VAL_EX                                              'is'
          5        SEND_VAL_EX                                              'an'
          6        SEND_VAL_EX                                              'example'
          7        SEND_VAL_EX                                              'of'
          8        SEND_VAL_EX                                              'variadics'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T0OYf
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        FUNC_GET_ARGS                                    ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    9     4      > RETURN                                                   null

End of function bar

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T0OYf
function name:  __call
number of ops:  11
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        INIT_FCALL                                               'array_unshift'
          3        SEND_REF                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   14     6        INIT_METHOD_CALL                                         'bar'
          7        SEND_UNPACK                                              !1
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      1          
   15    10      > RETURN                                                   null

End of function __call

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.53 ms | 1396 KiB | 17 Q