3v4l.org

run code in 300+ PHP versions simultaneously
<?php function count_to_ten() { yield 1; yield 2; yield from [3, 4]; yield from new ArrayIterator([5, 6]); yield from seven_eight(); return yield from nine_ten(); } function seven_eight() { yield 7; yield from eight(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4tdbe
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E > > RETURN                                                   1

Function count_to_ten:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/4tdbe
function name:  count_to_ten
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    5     1        YIELD                                                    1
    7     2        YIELD                                                    2
    9     3        YIELD_FROM                                       ~2      <array>
          4        FREE                                                     ~2
   11     5        NEW                                              $3      'ArrayIterator'
          6        SEND_VAL_EX                                              <array>
          7        DO_FCALL                                      0          
          8        YIELD_FROM                                       ~5      $3
          9        FREE                                                     ~5
   13    10        INIT_FCALL_BY_NAME                                       'seven_eight'
         11        DO_FCALL                                      0  $6      
         12        YIELD_FROM                                       ~7      $6
         13        FREE                                                     ~7
   15    14        INIT_FCALL_BY_NAME                                       'nine_ten'
         15        DO_FCALL                                      0  $8      
         16        YIELD_FROM                                       ~9      $8
         17      > GENERATOR_RETURN                                         
   17    18*     > GENERATOR_RETURN                                         

End of function count_to_ten

Function seven_eight:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/4tdbe
function name:  seven_eight
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   GENERATOR_CREATE                                         
   23     1        YIELD                                                    7
   25     2        INIT_FCALL_BY_NAME                                       'eight'
          3        DO_FCALL                                      0  $1      
          4        YIELD_FROM                                       ~2      $1
          5        FREE                                                     ~2
   27     6      > GENERATOR_RETURN                                         

End of function seven_eight

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.41 ms | 1395 KiB | 13 Q