3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = (object)array("barrels"=>array("chemID"=> 1, "catID" => 1),array("chemID"=> 2, "catID" => 1)); $carts = (object)array(array("chemID"=> 1, "catID" => 4),array("chemID"=> 2, "catID" => 4), array("chemID"=> 2, "catID" => 1)); var_dump($products); foreach($products as $barrel=>$value) { echo $barrel . ' ' . $value; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/SXtFM
function name:  (null)
number of ops:  16
compiled vars:  !0 = $products, !1 = $carts, !2 = $value, !3 = $barrel
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~4      <array>
          1        ASSIGN                                                   !0, ~4
    4     2        CAST                                          8  ~6      <array>
          3        ASSIGN                                                   !1, ~6
    5     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    6     7      > FE_RESET_R                                       $9      !0, ->14
          8    > > FE_FETCH_R                                       ~10     $9, !2, ->14
          9    >   ASSIGN                                                   !3, ~10
    7    10        CONCAT                                           ~12     !3, '+'
         11        CONCAT                                           ~13     ~12, !2
         12        ECHO                                                     ~13
    6    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $9
    8    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.94 ms | 1395 KiB | 15 Q