File: voidify.php

package info (click to toggle)
php-doc 20061001-1
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 45,764 kB
  • ctags: 1,611
  • sloc: xml: 502,485; php: 7,645; cpp: 500; makefile: 297; perl: 161; sh: 141; 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);
}