3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $params = func_get_args(); echo bar(...$params); } function bar($a, $b = null) { return $a . ' ' . $b; } function baz($a, ...$b){ echo $a + count($b); } foo('hello', 'world'); baz(1,2,3,4); //4
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZRatN
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 'hello'
          2        SEND_VAL                                                 'world'
          3        DO_FCALL                                      0          
   17     4        INIT_FCALL                                               'baz'
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 2
          7        SEND_VAL                                                 3
          8        SEND_VAL                                                 4
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZRatN
function name:  foo
number of ops:  8
compiled vars:  !0 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
    5     2        INIT_FCALL_BY_NAME                                       'bar'
          3        SEND_UNPACK                                              !0
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      1  $3      
          6        ECHO                                                     $3
    6     7      > 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/ZRatN
function name:  bar
number of ops:  6
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    9     2        CONCAT                                           ~2      !0, '+'
          3        CONCAT                                           ~3      ~2, !1
          4      > RETURN                                                   ~3
   10     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/ZRatN
function name:  baz
number of ops:  6
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV_VARIADIC                                    !1      
   13     2        COUNT                                            ~2      !1
          3        ADD                                              ~3      !0, ~2
          4        ECHO                                                     ~3
   14     5      > RETURN                                                   null

End of function baz

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.73 ms | 1399 KiB | 15 Q