3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { yield 1; yield 2; yield 3; } function goo($x, $y, $z) { print "$x $y $z\n"; } goo(...foo()); // 1 2 3 ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WdGDd
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                                   'goo'
          1        INIT_FCALL                                                   'foo'
          2        DO_FCALL                                          0  $0      
          3        SEND_UNPACK                                                  $0
          4        CHECK_UNDEF_ARGS                                             
          5        DO_FCALL                                          0          
   17     6      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/WdGDd
function name:  foo
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                             
    4     1        YIELD                                                        1
    5     2        YIELD                                                        2
    6     3        YIELD                                                        3
    8     4      > GENERATOR_RETURN                                             

End of function foo

Function goo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WdGDd
function name:  goo
number of ops:  11
compiled vars:  !0 = $x, !1 = $y, !2 = $z
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
   11     3        ROPE_INIT                                         6  ~4      !0
          4        ROPE_ADD                                          1  ~4      ~4, '+'
          5        ROPE_ADD                                          2  ~4      ~4, !1
          6        ROPE_ADD                                          3  ~4      ~4, '+'
          7        ROPE_ADD                                          4  ~4      ~4, !2
          8        ROPE_END                                          5  ~3      ~4, '%0A'
          9        ECHO                                                         ~3
   12    10      > RETURN                                                       null

End of function goo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
141.53 ms | 1472 KiB | 15 Q