3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bar($input) { print_r(func_num_args()); } function foo($input) { $args = func_get_args(); array_shift($args); bar($input, $args); } foo('Hallo %s %d', 'Foo', 42);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2LCoW
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 'Hallo+%25s+%25d'
          2        SEND_VAL                                                 'Foo'
          3        SEND_VAL                                                 42
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2LCoW
function name:  bar
number of ops:  6
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'print_r'
          2        FUNC_NUM_ARGS                                    ~1      
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    5     5      > 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/2LCoW
function name:  foo
number of ops:  11
compiled vars:  !0 = $input, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        FUNC_GET_ARGS                                    ~2      
          2        ASSIGN                                                   !1, ~2
    9     3        INIT_FCALL                                               'array_shift'
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
   11     6        INIT_FCALL                                               'bar'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0          
   12    10      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.95 ms | 1398 KiB | 19 Q