3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'Audi MODEL 80 ENGINE 1.9 TDi POWER 90Hk TORQUE 202Nm GEAR man DRIVE 2wd YEAR 1996', 'Audi MODEL 80 ENGINE 1.9 TDi YEAR 1996 NOTE this engine needs custom stage GEAR auto', 'Audi MODEL 80 ENGINE 1.9 TDi GEAR man YEAR 1996', 'Audi MODEL 80 ENGINE 1.9 TDi YEAR 1996 DRIVE 2wd' ]; foreach ($strings as $string) { preg_match_all('/\b(DRIVE|ENGINE|[GY]EAR|MAKE|MODEL|NOTE|POWER|TORQUE)\s+(\S+(?:\s+\S+)*?)/', 'MAKE ' . $string, $m, PREG_SET_ORDER); var_export(array_column($m, 2, 1)); echo "\n---\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 20
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/eWqdq
function name:  (null)
number of ops:  22
compiled vars:  !0 = $strings, !1 = $string, !2 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1      > FE_RESET_R                                       $4      !0, ->20
          2    > > FE_FETCH_R                                               $4, !1, ->20
   11     3    >   INIT_FCALL                                               'preg_match_all'
          4        SEND_VAL                                                 '%2F%5Cb%28DRIVE%7CENGINE%7C%5BGY%5DEAR%7CMAKE%7CMODEL%7CNOTE%7CPOWER%7CTORQUE%29%5Cs%2B%28%5CS%2B%28%3F%3A%5Cs%2B%5CS%2B%29%2A%3F%29%2F'
          5        CONCAT                                           ~5      'MAKE+', !1
          6        SEND_VAL                                                 ~5
          7        SEND_REF                                                 !2
          8        SEND_VAL                                                 2
          9        DO_ICALL                                                 
   12    10        INIT_FCALL                                               'var_export'
         11        INIT_FCALL                                               'array_column'
         12        SEND_VAR                                                 !2
         13        SEND_VAL                                                 2
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $7      
         16        SEND_VAR                                                 $7
         17        DO_ICALL                                                 
   13    18        ECHO                                                     '%0A---%0A'
   10    19      > JMP                                                      ->2
         20    >   FE_FREE                                                  $4
   14    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.79 ms | 1000 KiB | 16 Q