add eregi, eregi_replace compatible functions

This commit is contained in:
Namhyeon Go 2018-12-29 12:23:14 +09:00
parent 88aa5342e4
commit 56fe3eeeb6

View File

@ -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);
}
}