Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // We want to use the function stripos,
- // but thats only available since PHP5.
- // So we cloned the function...
- if(!function_exists('stripos')) {
- function stripos_clone($haystack, $needle, $offset=0) {
- return strpos(strtoupper($haystack), strtoupper($needle), $offset);
- }
- } else {
- // But when this is PHP5, we use the original function
- function stripos_clone($haystack, $needle, $offset=0) {
- return stripos($haystack, $needle, $offset=0);
- }
- }
Add Comment
Please, Sign In to add comment