Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing issue 21.

  • Loading branch information...
commit ad425e91aa8e14ad2432e343294d2ee0b6e6a686 1 parent 803da0a
Vlad Andersen mustangostang authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  php4/5to4.php
1  php4/5to4.php
View
@@ -8,6 +8,7 @@ function php5to4 ($src, $dest) {
$code = preg_replace ('#(public|private|protected)\s+static\s+\$#i', 'var \$', $code);
$code = preg_replace ('#(public|private|protected)\s+function#i', 'function', $code);
$code = preg_replace ('#(public|private|protected)\s+static\s+function#i', 'function', $code);
+ $code = preg_replace ('#throw new Exception\\(([^)]*)\\)#i', 'trigger_error($1,E_USER_ERROR)', $code);
$code = str_replace ('self::', '$this->', $code);
$f = fopen ($dest, 'w');
fwrite($f, $code);
Please sign in to comment.
Something went wrong with that request. Please try again.