removed use of PHP 5.3 deprecated eregi

This commit is contained in:
Ralf Becker 2010-09-17 19:32:11 +00:00
parent 409b8dd552
commit d29205529b

View File

@ -184,7 +184,7 @@ class solangfile
function parse_php_app($app,$fd) function parse_php_app($app,$fd)
{ {
$reg_expr = '('.implode('|',array_keys($this->functions)).")[ \t]*\([ \t]*(.*)$"; $reg_expr = '/('.implode('|',array_keys($this->functions)).")[ \t]*\([ \t]*(.*)$/i";
define('SEP',filesystem_separator()); define('SEP',filesystem_separator());
$d=dir($fd); $d=dir($fd);
while ($fn=$d->read()) while ($fn=$d->read())
@ -222,7 +222,7 @@ class solangfile
foreach($lines as $n => $line) foreach($lines as $n => $line)
{ {
//echo "line='$line', lines[1+$n]='".$lines[1+$n]."'<br>\n"; //echo "line='$line', lines[1+$n]='".$lines[1+$n]."'<br>\n";
while (eregi($reg_expr,$line,$parts)) while (preg_match($reg_expr,$line,$parts))
{ {
//echo "***func='$parts[1]', rest='$parts[2]'<br>\n"; //echo "***func='$parts[1]', rest='$parts[2]'<br>\n";
$args = $this->functions[$parts[1]]; $args = $this->functions[$parts[1]];