3v4l.org

run code in 300+ PHP versions simultaneously
<?php use ArchitectureStandards\Helpers\ErrorFormatter; $re = '/@param\s+(\S+)\s+\$(\S+)/m'; $str = '/*@param test $arno @param test2 $lucie'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); foreach ($matches as $match) { print_r($match); }
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Array ( [0] => @param test $arno [1] => test [2] => arno ) Array ( [0] => @param test2 $lucie [1] => test2 [2] => lucie )

preferences:
74.87 ms | 402 KiB | 62 Q