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 $key) { foreach($key as $value) { echo $key . ' ' . $value; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/6L2Sq
function name:  (null)
number of ops:  19
compiled vars:  !0 = $products, !1 = $carts, !2 = $key, !3 = $value
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, ->17
          8    > > FE_FETCH_R                                               $9, !2, ->17
    7     9    > > FE_RESET_R                                       $10     !2, ->15
         10    > > FE_FETCH_R                                               $10, !3, ->15
    8    11    >   CONCAT                                           ~11     !2, '+'
         12        CONCAT                                           ~12     ~11, !3
         13        ECHO                                                     ~12
    7    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $10
    6    16      > JMP                                                      ->8
         17    >   FE_FREE                                                  $9
   10    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.74 ms | 1395 KiB | 15 Q