add eregi, eregi_replace compatible functions
This commit is contained in:
parent
88aa5342e4
commit
56fe3eeeb6
|
|
@ -150,3 +150,15 @@ if(!function_exists("parse_pipelined_data")) {
|
|||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
if(function_exists("eregi_compatible")) {
|
||||
function eregi_compatible($pattern, $subject, &$matches=NULL) {
|
||||
return preg_match(sprintf("/%s/i", $pattern), $subject, $matches);
|
||||
}
|
||||
}
|
||||
|
||||
if(function_exists("eregi_replace_compatible")) {
|
||||
function eregi_replace_compatible($pattern, $replacement, $subject) {
|
||||
return preg_replace(sprintf("/%s/i", $pattern), $replacement, $subject);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user