3v4l.org

run code in 300+ PHP versions simultaneously
<?php $results = [ (object)['id' => 1, 'uid' => 20, 'bet' => '1'], (object)['id' => 2, 'uid' => 20, 'bet' => '2'], (object)['id' => 1, 'uid' => 21, 'bet' => 'X'], (object)['id' => 2, 'uid' => 21, 'bet' => '1'], (object)['id' => 1, 'uid' => 22, 'bet' => 'X'], (object)['id' => 2, 'uid' => 22, 'bet' => 'X'] ]; $group = null; foreach ($results as $row){ if ($row->uid !== $group) { echo "<div class=\"kupon_gruppe\">Group - $row->uid:</div>\n"; } echo "<div class=\"dagens_kampe_kupon\">ID: $row->id - Bet: $row->bet</div>\n"; $group = $row->uid; };
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 35
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 35
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 24
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/uNtJL
function name:  (null)
number of ops:  37
compiled vars:  !0 = $results, !1 = $group, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~3      <array>
          1        INIT_ARRAY                                       ~4      ~3
    4     2        CAST                                          8  ~5      <array>
          3        ADD_ARRAY_ELEMENT                                ~4      ~5
    5     4        CAST                                          8  ~6      <array>
          5        ADD_ARRAY_ELEMENT                                ~4      ~6
    6     6        CAST                                          8  ~7      <array>
          7        ADD_ARRAY_ELEMENT                                ~4      ~7
    7     8        CAST                                          8  ~8      <array>
          9        ADD_ARRAY_ELEMENT                                ~4      ~8
    8    10        CAST                                          8  ~9      <array>
         11        ADD_ARRAY_ELEMENT                                ~4      ~9
    2    12        ASSIGN                                                   !0, ~4
   11    13        ASSIGN                                                   !1, null
   12    14      > FE_RESET_R                                       $12     !0, ->35
         15    > > FE_FETCH_R                                               $12, !2, ->35
   13    16    >   FETCH_OBJ_R                                      ~13     !2, 'uid'
         17        IS_NOT_IDENTICAL                                         !1, ~13
         18      > JMPZ                                                     ~14, ->24
   14    19    >   ROPE_INIT                                     3  ~17     '%3Cdiv+class%3D%22kupon_gruppe%22%3EGroup+-+'
         20        FETCH_OBJ_R                                      ~15     !2, 'uid'
         21        ROPE_ADD                                      1  ~17     ~17, ~15
         22        ROPE_END                                      2  ~16     ~17, '%3A%3C%2Fdiv%3E%0A'
         23        ECHO                                                     ~16
   16    24    >   ROPE_INIT                                     5  ~22     '%3Cdiv+class%3D%22dagens_kampe_kupon%22%3EID%3A+'
         25        FETCH_OBJ_R                                      ~19     !2, 'id'
         26        ROPE_ADD                                      1  ~22     ~22, ~19
         27        ROPE_ADD                                      2  ~22     ~22, '+-+Bet%3A+'
         28        FETCH_OBJ_R                                      ~20     !2, 'bet'
         29        ROPE_ADD                                      3  ~22     ~22, ~20
         30        ROPE_END                                      4  ~21     ~22, '%3C%2Fdiv%3E%0A'
         31        ECHO                                                     ~21
   17    32        FETCH_OBJ_R                                      ~25     !2, 'uid'
         33        ASSIGN                                                   !1, ~25
   12    34      > JMP                                                      ->15
         35    >   FE_FREE                                                  $12
   18    36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.98 ms | 1395 KiB | 13 Q