3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { yield 1; yield 2; yield 3; return ['a', 'b', 'c']; } function foo2() { return ['a', 'b', 'c']; } function goo($x, $y, $z) { print "$x $y $z\n"; } goo(...foo()); goo(...foo2());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lS3WS
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     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          
   20     6        INIT_FCALL                                                   'goo'
          7        INIT_FCALL                                                   'foo2'
          8        DO_FCALL                                          0  $2      
          9        SEND_UNPACK                                                  $2
         10        CHECK_UNDEF_ARGS                                             
         11        DO_FCALL                                          0          
         12      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/lS3WS
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 foo2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lS3WS
function name:  foo2
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                       <array>
   13     1*     > RETURN                                                       null

End of function foo2

Function goo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lS3WS
function name:  goo
number of ops:  11
compiled vars:  !0 = $x, !1 = $y, !2 = $z
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
   16     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
   17    10      > RETURN                                                       null

End of function goo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.56 ms | 1374 KiB | 17 Q