+
80
-

回答

<?php

$data = "/**测试*/function bfw(){}";
preg_match_all('/(\/\*{2})([^{]*)(\*\/)[\s\w]*function\s+([^(]+)\(([^)]*)\)/U', $data, $match);

foreach ($match[2] as $ma) {
echo "注释:".$ma."</br>";
}
foreach ($match[4] as $ma) {
echo "函数名:".$ma."</br>";
}

?>


网友回复

我知道答案,我要回答