3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '/** @var string[] */ /** @return string[] */ * @param Company[]|null $companies $icons[] = static::getIconDetailsFromLink($link); $this->properties[] = $property;'; if (preg_match_all('/\b(?<!\$|->)\w+\[]/', $str, $matches)) { print_r($matches); }

preferences:
33.02 ms | 405 KiB | 5 Q