3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Hello @1a1a-1a1a and @2B2B2-B2 too'; preg_match_all("/@([a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)+)/", $string, $matches); print_r($matches[1]);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
161.7 ms | 2547 KiB | 10 Q