3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string= "Hi #geeting #shortAnswer #notUseful"; preg_match_all('/#(\w+)/',$string, $matches); echo "The matches:\n"; foreach ($matches[1] as $tag) { echo $tag."\n"; } echo "\n\nThe array \$matches:\n"; var_dump($matches);

preferences:
41.13 ms | 402 KiB | 5 Q