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); var_dump($matches);
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
array(2) { [0]=> array(3) { [0]=> string(17) "@param test $arno" [1]=> string(4) "test" [2]=> string(4) "arno" } [1]=> array(3) { [0]=> string(19) "@param test2 $lucie" [1]=> string(5) "test2" [2]=> string(5) "lucie" } }

preferences:
85.25 ms | 403 KiB | 62 Q