3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cars = array(); $car1 = new stdClass(); $car1->name = "Car1"; $car1->colour = "Blue"; $cars[] = $car1; $mycars = array(); foreach($cars as $car){ $mycars[$car->colour][] = $car->name; } foreach($mycars as $colour => $cars) { echo "<div class='$colour'>"; foreach($cars as $car) { echo "<h1>$car</h1>"; echo "<p>$colour</p>"; } echo "</div>"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 41
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 41
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 38
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 38
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 38
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
Branch analysis from position: 19
filename:       /in/5WMYl
function name:  (null)
number of ops:  43
compiled vars:  !0 = $cars, !1 = $car1, !2 = $mycars, !3 = $car, !4 = $colour
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $6      'stdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
    5     4        ASSIGN_OBJ                                               !1, 'name'
          5        OP_DATA                                                  'Car1'
    6     6        ASSIGN_OBJ                                               !1, 'colour'
          7        OP_DATA                                                  'Blue'
    7     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  !1
   10    10        ASSIGN                                                   !2, <array>
   11    11      > FE_RESET_R                                       $13     !0, ->19
         12    > > FE_FETCH_R                                               $13, !3, ->19
   12    13    >   FETCH_OBJ_R                                      ~14     !3, 'colour'
         14        FETCH_OBJ_R                                      ~17     !3, 'name'
         15        FETCH_DIM_W                                      $15     !2, ~14
         16        ASSIGN_DIM                                               $15
         17        OP_DATA                                                  ~17
   11    18      > JMP                                                      ->12
         19    >   FE_FREE                                                  $13
   15    20      > FE_RESET_R                                       $18     !2, ->41
         21    > > FE_FETCH_R                                       ~19     $18, !0, ->41
         22    >   ASSIGN                                                   !4, ~19
   16    23        ROPE_INIT                                     3  ~22     '%3Cdiv+class%3D%27'
         24        ROPE_ADD                                      1  ~22     ~22, !4
         25        ROPE_END                                      2  ~21     ~22, '%27%3E'
         26        ECHO                                                     ~21
   17    27      > FE_RESET_R                                       $24     !0, ->38
         28    > > FE_FETCH_R                                               $24, !3, ->38
   18    29    >   ROPE_INIT                                     3  ~26     '%3Ch1%3E'
         30        ROPE_ADD                                      1  ~26     ~26, !3
         31        ROPE_END                                      2  ~25     ~26, '%3C%2Fh1%3E'
         32        ECHO                                                     ~25
   19    33        ROPE_INIT                                     3  ~29     '%3Cp%3E'
         34        ROPE_ADD                                      1  ~29     ~29, !4
         35        ROPE_END                                      2  ~28     ~29, '%3C%2Fp%3E'
         36        ECHO                                                     ~28
   17    37      > JMP                                                      ->28
         38    >   FE_FREE                                                  $24
   21    39        ECHO                                                     '%3C%2Fdiv%3E'
   15    40      > JMP                                                      ->21
         41    >   FE_FREE                                                  $18
   22    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.16 ms | 1399 KiB | 13 Q