3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "test string (test.url.com) abcdef java.lang.Assertion uvwxyz www.google.com abcdef", "another test string /abc/xyz/lib/def/GH.tr test 200." ]; $strings = array_map(function($x) { preg_match_all('~\bjava(?:\.\w+)+(*SKIP)(*FAIL)|(?<!/)\b\w+(?:\.\w+)+~', $x, $matches); return $matches[0]; }, $strings); print_r($strings);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
163.46 ms | 2065 KiB | 13 Q