3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $prodQueryResult =array('PRODUCT1'=>'prod1','QUANTITY1'=>'quan1','PRODUCT2'=>'prod2','QUANTITY2'=>'quan2','PRODUCT3'=>'prod3','QUANTITY3'=>'quan3','PRODUCT4'=>'prod4','QUANTITY4'=>'quan4','PRODUCT5'=>'prod5','QUANTITY5'=>'quan5','PRODUCT6'=>'prod6','QUANTITY6'=>'quan6','PRODUCT7'=>'prod7','QUANTITY7'=>'quan7'); $i=6; foreach($prodQueryResult as $prod) { $count=$i; $p = "PRODUCT".$i; $q = "QUANTITY".$i; //echo $q."\n"; echo $prod."\n"; $i++; }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
Jump found. Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
Jump found. Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
Jump found. Position 1 = -2
Branch analysis from position: 14
filename:       /in/EEO2O
function name:  (null)
number of ops:  16
compiled vars:  !0 = $prodQueryResult, !1 = $i, !2 = $prod, !3 = $count, !4 = $p, !5 = $q
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, <array>
   3     1        ASSIGN                                                   !1, 6
   5     2      > FE_RESET_R                                       $8      !0, ->14
         3    > > FE_FETCH_R                                               $8, !2, ->14
   7     4    >   ASSIGN                                                   !3, !1
   8     5        CONCAT                                           ~10     'PRODUCT', !1
         6        ASSIGN                                                   !4, ~10
   9     7        CONCAT                                           ~12     'QUANTITY', !1
         8        ASSIGN                                                   !5, ~12
  12     9        CONCAT                                           ~14     !2, '%0A'
        10        ECHO                                                     ~14
  13    11        POST_INC                                         ~15     !1
        12        FREE                                                     ~15
        13      > JMP                                                      ->3
        14    >   FE_FREE                                                  $8
        15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0