3v4l.org

run code in 300+ PHP versions simultaneously
<?php function series($start, $end) { for ($i = $start; $i <= $end; ++$i) { yield $i; } } $a = series(5, 15); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v5gS0
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'series'
          1        SEND_VAL                                                 5
          2        SEND_VAL                                                 15
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
   12     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function series:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 5
Branch analysis from position: 9
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 5
Branch analysis from position: 9
Branch analysis from position: 5
filename:       /in/v5gS0
function name:  series
number of ops:  10
compiled vars:  !0 = $start, !1 = $end, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        GENERATOR_CREATE                                         
    5     3        ASSIGN                                                   !2, !0
          4      > JMP                                                      ->7
    7     5    >   YIELD                                                    !2
    5     6        PRE_INC                                                  !2
          7    >   IS_SMALLER_OR_EQUAL                                      !2, !1
          8      > JMPNZ                                                    ~6, ->5
    9     9    > > GENERATOR_RETURN                                         

End of function series

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.64 ms | 1402 KiB | 16 Q