3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "A4 1.9tdi (2003-2009)", "A4 2.0tdi (2003-2009)", "Passat B7 1.9tdi(2003-2009)", "Passat B7 2.0 tdi(2003-2010)" ]; foreach($array as $val){ $temp = explode(" ", $val); $new[$temp[0]][] = $val; } foreach($new as $car => $cars){ echo "<some html tag>". $car . "</Some html tag>\n"; echo "<some other tag>" . implode("</some other tag>\n<some other tag>", $cars) . "</some other tag>\n"; echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 13
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 29
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 29
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
Branch analysis from position: 13
filename:       /in/N8YTu
function name:  (null)
number of ops:  31
compiled vars:  !0 = $array, !1 = $val, !2 = $temp, !3 = $new, !4 = $cars, !5 = $car
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1      > FE_RESET_R                                       $7      !0, ->13
          2    > > FE_FETCH_R                                               $7, !1, ->13
   11     3    >   INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !2, $8
   12     8        FETCH_DIM_R                                      ~10     !2, 0
          9        FETCH_DIM_W                                      $11     !3, ~10
         10        ASSIGN_DIM                                               $11
         11        OP_DATA                                                  !1
   10    12      > JMP                                                      ->2
         13    >   FE_FREE                                                  $7
   15    14      > FE_RESET_R                                       $13     !3, ->29
         15    > > FE_FETCH_R                                       ~14     $13, !4, ->29
         16    >   ASSIGN                                                   !5, ~14
   16    17        CONCAT                                           ~16     '%3Csome+html+tag%3E', !5
         18        CONCAT                                           ~17     ~16, '%3C%2FSome+html+tag%3E%0A'
         19        ECHO                                                     ~17
   17    20        INIT_FCALL                                               'implode'
         21        SEND_VAL                                                 '%3C%2Fsome+other+tag%3E%0A%3Csome+other+tag%3E'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $18     
         24        CONCAT                                           ~19     '%3Csome+other+tag%3E', $18
         25        CONCAT                                           ~20     ~19, '%3C%2Fsome+other+tag%3E%0A'
         26        ECHO                                                     ~20
   18    27        ECHO                                                     '%0A'
   15    28      > JMP                                                      ->15
         29    >   FE_FREE                                                  $13
   19    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.95 ms | 1012 KiB | 15 Q