3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xrange($start, $end, $inc) { for ($start; $start <= $end; $start+=$inc) { yield $start; } } foreach(xrange(1, 100) as $n) { print "$n\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/0OD8G
function name:  (null)
number of ops:  12
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'xrange'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 100
          3        DO_FCALL                                      0  $1      
          4      > FE_RESET_R                                       $2      $1, ->10
          5    > > FE_FETCH_R                                               $2, !0, ->10
    9     6    >   NOP                                                      
          7        FAST_CONCAT                                      ~3      !0, '%0A'
          8        ECHO                                                     ~3
    8     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $2
   10    11      > RETURN                                                   1

Function xrange:
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/0OD8G
function name:  xrange
number of ops:  10
compiled vars:  !0 = $start, !1 = $end, !2 = $inc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        GENERATOR_CREATE                                         
    3     4      > JMP                                                      ->7
    4     5    >   YIELD                                                    !0
    3     6        ASSIGN_OP                                     1          !0, !2
          7    >   IS_SMALLER_OR_EQUAL                                      !0, !1
          8      > JMPNZ                                                    ~5, ->5
    6     9    > > GENERATOR_RETURN                                         

End of function xrange

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.71 ms | 1399 KiB | 14 Q