3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = [1,2,3,4,5,6,7,8,9,10]; foreach ($numbers as $key => $val) { echo $val.PHP_EOL; } function xrange($start, $limit, $step = 1) { for ($i = $start; $i <= $limit; $i += $step) { yield $i; } } foreach (xrange(1, 9, 2) as $number) { echo "$number "; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 7
filename:       /in/A8uoK
function name:  (null)
number of ops:  21
compiled vars:  !0 = $numbers, !1 = $val, !2 = $key, !3 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $5      !0, ->7
          2    > > FE_FETCH_R                                       ~6      $5, !1, ->7
          3    >   ASSIGN                                                   !2, ~6
    5     4        CONCAT                                           ~8      !1, '%0A'
          5        ECHO                                                     ~8
    4     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $5
   13     8        INIT_FCALL                                               'xrange'
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 9
         11        SEND_VAL                                                 2
         12        DO_FCALL                                      0  $9      
         13      > FE_RESET_R                                       $10     $9, ->19
         14    > > FE_FETCH_R                                               $10, !3, ->19
   14    15    >   NOP                                                      
         16        FAST_CONCAT                                      ~11     !3, '+'
         17        ECHO                                                     ~11
   13    18      > JMP                                                      ->14
         19    >   FE_FREE                                                  $10
   15    20      > RETURN                                                   1

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

End of function xrange

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.07 ms | 1403 KiB | 14 Q