/** * FIX "@var" annotation for Doxygen * * @fixme static property * @see http://stackoverflow.com/a/8472180 * @see https://bugzilla.gnome.org/show_bug.cgi?id=626105 */ $source = file_get_contents($argv[1]); $regexp = '#\@var\s+([^\s]+)([^/]+)/\s+(var|public|protected|private)\s+(\$[^\s;=]+)#'; $replac = '${2} */ ${3} ${1} ${4}'; $source = preg_replace($regexp, $replac, $source); echo $source;