3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xrange($min, $max) { for ($i = $min; $i <= $max; $i++) { yield $i; } } foreach (xrange(1, 10) as $key => $value) { echo "$key => $value", PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/s5rps
function name:  (null)
number of ops:  15
compiled vars:  !0 = $value, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'xrange'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10
          3        DO_FCALL                                      0  $2      
          4      > FE_RESET_R                                       $3      $2, ->13
          5    > > FE_FETCH_R                                       ~4      $3, !0, ->13
          6    >   ASSIGN                                                   !1, ~4
   10     7        ROPE_INIT                                     3  ~7      !1
          8        ROPE_ADD                                      1  ~7      ~7, '+%3D%3E+'
          9        ROPE_END                                      2  ~6      ~7, !0
         10        ECHO                                                     ~6
         11        ECHO                                                     '%0A'
    9    12      > JMP                                                      ->5
         13    >   FE_FREE                                                  $3
   11    14      > 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/s5rps
function name:  xrange
number of ops:  10
compiled vars:  !0 = $min, !1 = $max, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        GENERATOR_CREATE                                         
    4     3        ASSIGN                                                   !2, !0
          4      > JMP                                                      ->7
    5     5    >   YIELD                                                    !2
    4     6        PRE_INC                                                  !2
          7    >   IS_SMALLER_OR_EQUAL                                      !2, !1
          8      > JMPNZ                                                    ~6, ->5
    7     9    > > GENERATOR_RETURN                                         

End of function xrange

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.42 ms | 1399 KiB | 14 Q