3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 0 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF1' ], 1 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF900' ], 2 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF324234' ], 3 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G2', 'filters_label' => 'FF23942' ], 4 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF3242' ], 5 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF78978' ], 6 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF48395043' ], 7 => [ 'regulations_label' => 'Asia', 'groups_label' => 'G2000', 'filters_label' => 'FF7' ] ]; foreach ($data as $key => $d) { if ($key > 0) { if ($data[$key-1]['regulations_label'] !== $d['regulations_label']) { echo $d['regulations_label'] . "\n"; } if ($data[$key-1]['groups_label'] !== $d['groups_label']) { echo "-" . $d['groups_label'] . "\n"; } } else { echo $d['regulations_label'] . "\n"; echo "-" . $d['groups_label'] . "\n"; } echo ' -- ' . $d['filters_label'] . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 38
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 38
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 26
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 25
Branch analysis from position: 15
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/ihYVj
function name:  (null)
number of ops:  40
compiled vars:  !0 = $data, !1 = $d, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   45     1      > FE_RESET_R                                       $4      !0, ->38
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->38
          3    >   ASSIGN                                                   !2, ~5
   46     4        IS_SMALLER                                               0, !2
          5      > JMPZ                                                     ~7, ->26
   47     6    >   SUB                                              ~8      !2, 1
          7        FETCH_DIM_R                                      ~9      !0, ~8
          8        FETCH_DIM_R                                      ~10     ~9, 'regulations_label'
          9        FETCH_DIM_R                                      ~11     !1, 'regulations_label'
         10        IS_NOT_IDENTICAL                                         ~10, ~11
         11      > JMPZ                                                     ~12, ->15
   48    12    >   FETCH_DIM_R                                      ~13     !1, 'regulations_label'
         13        CONCAT                                           ~14     ~13, '%0A'
         14        ECHO                                                     ~14
   51    15    >   SUB                                              ~15     !2, 1
         16        FETCH_DIM_R                                      ~16     !0, ~15
         17        FETCH_DIM_R                                      ~17     ~16, 'groups_label'
         18        FETCH_DIM_R                                      ~18     !1, 'groups_label'
         19        IS_NOT_IDENTICAL                                         ~17, ~18
         20      > JMPZ                                                     ~19, ->25
   52    21    >   FETCH_DIM_R                                      ~20     !1, 'groups_label'
         22        CONCAT                                           ~21     '-', ~20
         23        CONCAT                                           ~22     ~21, '%0A'
         24        ECHO                                                     ~22
   46    25    > > JMP                                                      ->33
   57    26    >   FETCH_DIM_R                                      ~23     !1, 'regulations_label'
         27        CONCAT                                           ~24     ~23, '%0A'
         28        ECHO                                                     ~24
   58    29        FETCH_DIM_R                                      ~25     !1, 'groups_label'
         30        CONCAT                                           ~26     '-', ~25
         31        CONCAT                                           ~27     ~26, '%0A'
         32        ECHO                                                     ~27
   60    33    >   FETCH_DIM_R                                      ~28     !1, 'filters_label'
         34        CONCAT                                           ~29     '+--+', ~28
         35        CONCAT                                           ~30     ~29, '%0A'
         36        ECHO                                                     ~30
   45    37      > JMP                                                      ->2
         38    >   FE_FREE                                                  $4
   62    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.18 ms | 1000 KiB | 13 Q