3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($a, $b) { var_dump($a, $b); } function bar($args) { foo(...$args); } function baz(...$args) { foo(...$args); } bar(['b'=> 'bee', 'a' => 'wahey']); baz(b: 'bee', a: 'wahey');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TSgfm
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'bar'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0          
   10     3        INIT_FCALL                                               'baz'
          4        SEND_VAL_EX                                              'bee', 'b'
          5        SEND_VAL_EX                                              'wahey', 'a'
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      1          
          8      > RETURN                                                   1

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

End of function foo

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

End of function bar

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

End of function baz

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.21 ms | 1409 KiB | 19 Q