3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vehicles = [ 'vehicleSuper' => [ "adder", "autarch", "banshee2", "bullet" ], 'vehicleSport' => [ "alpha", "banshee", "bestiagts", "blista2" ], //... ]; $textures = [ 'candc_apartments' => [ "limo2_b", "limo2", ], 'candc_default' => [ "marshall_flag18_b", "mesa_b", "rentbus", "marshall_flag21_b", "crusader", "boxville4", "buzzard_b", "dukes2_b", "dukes", ], 'lgm_default' => [ "hotknife", "coquette", "voltic_tless", "vacca", "infernus", "cogcabri_b", "stinger_b", "banshee_b", "ztype", "ninef", "jb700", "superd", "monroe_b", "rapidgt2_b", "khamel", "comet2_b", "cheetah_b", "rapidgt_b", "stinger", "carbon_b", "surano_convertable_b", "rapidgt2", "infernus_b", "jb700_b", "ninef_b", "stingerg", "superd_b", "bullet_b", "ztype_b", "hotknife_b", "cogcabri", "surano_convertable", "rapidgt", "stingerg_b", "coquette_b", "bullet", "carbon", "ninef2", "carboniz", "cheetah", "adder_b", "entityxf", "adder", "feltzer", ], ]; foreach($vehicles as $category => $v_vals) { echo "vehicleSpawner " . $category . "[] = {\n"; foreach($textures as $k => $t_vals) { foreach (array_intersect($v_vals, $t_vals) as $match) { echo " { \"$match\", \"$k\", \"$match\" },\n"; } } echo "}\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 31
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 31
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 28
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 28
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 26
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 26
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 26
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 28
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/YCcIl
function name:  (null)
number of ops:  33
compiled vars:  !0 = $vehicles, !1 = $textures, !2 = $v_vals, !3 = $category, !4 = $t_vals, !5 = $k, !6 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   20     2      > FE_RESET_R                                       $9      !0, ->31
          3    > > FE_FETCH_R                                       ~10     $9, !2, ->31
          4    >   ASSIGN                                                   !3, ~10
   21     5        CONCAT                                           ~12     'vehicleSpawner+', !3
          6        CONCAT                                           ~13     ~12, '%5B%5D+%3D+%7B%0A'
          7        ECHO                                                     ~13
   22     8      > FE_RESET_R                                       $14     !1, ->28
          9    > > FE_FETCH_R                                       ~15     $14, !4, ->28
         10    >   ASSIGN                                                   !5, ~15
   23    11        INIT_FCALL                                               'array_intersect'
         12        SEND_VAR                                                 !2
         13        SEND_VAR                                                 !4
         14        DO_ICALL                                         $17     
         15      > FE_RESET_R                                       $18     $17, ->26
         16    > > FE_FETCH_R                                               $18, !6, ->26
   25    17    >   ROPE_INIT                                     7  ~20     '++%7B+%22'
         18        ROPE_ADD                                      1  ~20     ~20, !6
         19        ROPE_ADD                                      2  ~20     ~20, '%22%2C+%22'
         20        ROPE_ADD                                      3  ~20     ~20, !5
         21        ROPE_ADD                                      4  ~20     ~20, '%22%2C+%22'
         22        ROPE_ADD                                      5  ~20     ~20, !6
         23        ROPE_END                                      6  ~19     ~20, '%22+%7D%2C%0A'
         24        ECHO                                                     ~19
   23    25      > JMP                                                      ->16
         26    >   FE_FREE                                                  $18
   22    27      > JMP                                                      ->9
         28    >   FE_FREE                                                  $14
   28    29        ECHO                                                     '%7D%0A'
   20    30      > JMP                                                      ->3
         31    >   FE_FREE                                                  $9
   29    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.33 ms | 1003 KiB | 14 Q