3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { yield 1; yield 2; yield 3; return ' 4'; } function goo($a, $b, $c) { print "$a $b $c"; } print PHP_EOL; goo(...foo()); goo(...($g = foo())); echo $g->getReturn(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DLIiA
function name:  (null)
number of ops:  18
compiled vars:  !0 = $g
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                         '%0A'
   16     1        INIT_FCALL                                                   'goo'
          2        INIT_FCALL                                                   'foo'
          3        DO_FCALL                                          0  $1      
          4        SEND_UNPACK                                                  $1
          5        CHECK_UNDEF_ARGS                                             
          6        DO_FCALL                                          0          
   18     7        INIT_FCALL                                                   'goo'
          8        INIT_FCALL                                                   'foo'
          9        DO_FCALL                                          0  $3      
         10        ASSIGN                                               ~4      !0, $3
         11        SEND_UNPACK                                                  ~4
         12        CHECK_UNDEF_ARGS                                             
         13        DO_FCALL                                          0          
   19    14        INIT_METHOD_CALL                                             !0, 'getReturn'
         15        DO_FCALL                                          0  $6      
         16        ECHO                                                         $6
   21    17      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/DLIiA
function name:  foo
number of ops:  6
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                                             
    9     5*     > 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/DLIiA
function name:  goo
number of ops:  10
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
   12     3        ROPE_INIT                                         5  ~4      !0
          4        ROPE_ADD                                          1  ~4      ~4, '+'
          5        ROPE_ADD                                          2  ~4      ~4, !1
          6        ROPE_ADD                                          3  ~4      ~4, '+'
          7        ROPE_END                                          4  ~3      ~4, !2
          8        ECHO                                                         ~3
   13     9      > RETURN                                                       null

End of function goo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
152.4 ms | 1472 KiB | 17 Q