3v4l.org

run code in 300+ PHP versions simultaneously
<?php $edition[] = 'Vol.123'; $edition[] = 'Edition 1920'; $edition[] = 'Volume 951'; $edition[] = 'Release A20'; $edition[] = 'Unknown data'; $editionFormats = ['Vol','Volume','Edition','Release']; $pattern = implode('|', $editionFormats); foreach ($edition as $e) { if (preg_match('/' . $pattern. '/', $e)) { echo $e . ' matches' . PHP_EOL; } else { echo $e . ' NOT matches' . PHP_EOL; } }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
168.05 ms | 2125 KiB | 10 Q