3v4l.org

run code in 300+ PHP versions simultaneously
<?php function run(int $max) { for ($i=1; $i<5; $i++) { unset($y, $z); yield ($y = $i*3) => $y; yield $z => ($z = $i*3); } } foreach(run(10) as $key => $value) { echo $key, ' => ', $value, PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/ntqfH
function name:  (null)
number of ops:  13
compiled vars:  !0 = $value, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'run'
          1        SEND_VAL                                                 10
          2        DO_FCALL                                      0  $2      
          3      > FE_RESET_R                                       $3      $2, ->11
          4    > > FE_FETCH_R                                       ~4      $3, !0, ->11
          5    >   ASSIGN                                                   !1, ~4
   13     6        ECHO                                                     !1
          7        ECHO                                                     '+%3D%3E+'
          8        ECHO                                                     !0
          9        ECHO                                                     '%0A'
   12    10      > JMP                                                      ->4
         11    >   FE_FREE                                                  $3
   14    12      > RETURN                                                   1

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
filename:       /in/ntqfH
function name:  run
number of ops:  16
compiled vars:  !0 = $max, !1 = $i, !2 = $y, !3 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        GENERATOR_CREATE                                         
    4     2        ASSIGN                                                   !1, 1
          3      > JMP                                                      ->13
    5     4    >   UNSET_CV                                                 !2
          5        UNSET_CV                                                 !3
    7     6        MUL                                              ~5      !1, 3
          7        ASSIGN                                           ~6      !2, ~5
          8        YIELD                                                    !2, ~6
    8     9        MUL                                              ~8      !1, 3
         10        ASSIGN                                           ~9      !3, ~8
         11        YIELD                                                    ~9, !3
    4    12        PRE_INC                                                  !1
         13    >   IS_SMALLER                                               !1, 5
         14      > JMPNZ                                                    ~12, ->4
   10    15    > > GENERATOR_RETURN                                         

End of function run

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.14 ms | 1003 KiB | 14 Q