3v4l.org

run code in 300+ PHP versions simultaneously
<?php function b(...$args) { foreach($args as $arg) { echo "arg: $arg" . PHP_EOL; } } function a(...$args) { b(...$args); } a("a", "b", 3, 2.7);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PDEur
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'a'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 'b'
          3        SEND_VAL                                                 3
          4        SEND_VAL                                                 2.7
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function b:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/PDEur
function name:  b
number of ops:  10
compiled vars:  !0 = $args, !1 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_VARIADIC                                    !0      
    4     1      > FE_RESET_R                                       $2      !0, ->8
          2    > > FE_FETCH_R                                               $2, !1, ->8
    5     3    >   NOP                                                      
          4        FAST_CONCAT                                      ~3      'arg%3A+', !1
          5        CONCAT                                           ~4      ~3, '%0A'
          6        ECHO                                                     ~4
    4     7      > JMP                                                      ->2
          8    >   FE_FREE                                                  $2
    7     9      > RETURN                                                   null

End of function b

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PDEur
function name:  a
number of ops:  6
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_VARIADIC                                    !0      
   10     1        INIT_FCALL                                               'b'
          2        SEND_UNPACK                                              !0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      1          
   11     5      > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.82 ms | 1399 KiB | 15 Q