3v4l.org

run code in 300+ PHP versions simultaneously
<?php function createAnd(...$args) { var_dump($args); } function foo() { createAnd(func_get_args()[0]); } class Cl { public static function createAnd(...$args) { var_dump($args); } public function bar() { static::createAnd(func_get_args()[0]); } } foo('x'); (new Cl())->bar('y');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E8CsC
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 'x'
          2        DO_FCALL                                      0          
   26     3        NEW                                              $1      'Cl'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $1, 'bar'
          6        SEND_VAL_EX                                              'y'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function createand

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E8CsC
function name:  foo
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'createand'
          1        FUNC_GET_ARGS                                    ~0      
          2        FETCH_DIM_R                                      ~1      ~0, 0
          3        SEND_VAL                                                 ~1
          4        DO_FCALL                                      0          
   12     5      > RETURN                                                   null

End of function foo

Class Cl:
Function createand:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E8CsC
function name:  createAnd
number of ops:  5
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV_VARIADIC                                    !0      
   17     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   18     4      > RETURN                                                   null

End of function createand

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E8CsC
function name:  bar
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_STATIC_METHOD_CALL                                  'createAnd'
          1        CHECK_FUNC_ARG                                           
          2        FUNC_GET_ARGS                                    ~0      
          3        FETCH_DIM_FUNC_ARG                               $1      ~0, 0
          4        SEND_FUNC_ARG                                            $1
          5        DO_FCALL                                      0          
   22     6      > RETURN                                                   null

End of function bar

End of class Cl.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.59 ms | 1017 KiB | 16 Q