i am using php 5.3.0 and i am use wamp server function is like that
eregi("^[ \f\r\t\n]{0,}(SELECT){1}(.+)$",$this->ss_last_query)
eregi("^[ \f\r\t\n]{0,}(UPDATE|INSERT|DELETE){1}(.+)$",$this->ss_last_query)
i am using php 5.3.0 and i am use wamp server function is like that
eregi("^[ \f\r\t\n]{0,}(SELECT){1}(.+)$",$this->ss_last_query)
eregi("^[ \f\r\t\n]{0,}(UPDATE|INSERT|DELETE){1}(.+)$",$this->ss_last_query)
Two options
ereg*
functions (use the PCRE suite instead)E_DEPRECATED
error reporting. See error_reporting()
The best option is #1 as the entire POSIX Extended suite will be removed in a future version.
I can't comprehend how people are still using this. It's been marked for removal for years. Not to mention the pre-deprecated "These functions are inferior!" warning that was up for even longer.
Use the preg_match
with the i
modifier, which specifies that you want a case insensitive match with your regex.
So you want:
preg_match("/regexhere/i", $str);
error_reporting(E_ALL ^ E_DEPRECATED);
If you must use eregi, but...
preg_match("/^[ \f\r\t\n]{0,}(UPDATE|INSERT|DELETE){1}(.+)$/is", $this->ss_last_query)
should also work.