File: voidify.php

package info (click to toggle)
php-doc 20100521-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 59,992 kB
  • ctags: 4,085
  • sloc: xml: 796,833; php: 21,338; cpp: 500; sh: 117; makefile: 58; awk: 28
file content (15 lines) | stat: -rw-r--r-- 326 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

function apply($input)
{
	$lines = explode("\n",$input);
	foreach ($lines as $nr => $line) {
		if (ereg("^([ \t]*)<paramdef>void</paramdef>",$line,$regs) ||
		    ereg("^([ \t]*)<void></void>",$line,$regs)) {

			$lines[$nr] = "$regs[1]<void/>";
			echo "-$line\n+$lines[$nr]\n";
		}
	}
	return implode("\n",$lines);
}