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([A-Z]+)\s+(\S+(?:\s+\S+)*?)(?=$|\s+[A-Z]+\b)/', 'MAKE ' . $string, $m, PREG_SET_ORDER); var_export(array_column($m, 2, 1)); echo "\n---\n"; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
158.12 ms | 1810 KiB | 11 Q