Deprecated:function Ereg () is sometimes present in the php5.3 environment () is deprecated in ... and Deprecated:function ereg_replace () is a deprecated in ... These types of error alerts.
PHP 5.3 ereg () does not work properly, prompting "Function ereg () is deprecated Error". The problem is that there are two regular representations in PHP, one is POSIX, and the other is a regular representation of PERL,PHP6 's intention to abolish POSIX, so it adds a preg_match later. The solution to this problem is simple, add a filter cue message symbol before Ereg: Turn ereg () into @ereg (). This blocked the hint message, but the fundamental problem is not resolved, PHP in the 5.2 version before the use of normal ereg, after 5.3, it is necessary to use Preg_match to replace Ereg. So the need to become this, the original:
if (!ereg ("^[0-9]+$", $id))
Change to:
if (!preg_match ("/^[0-9]+$/", $id))
Special reminder: The obvious difference between POSIX and Perl is whether or not to add slashes, so compared with Ereg, the latter added two "/" symbols to the regular before and after, not missing.
Tips: This issue does not occur in versions prior to php5.2.
http://www.bkjia.com/PHPjc/752537.html www.bkjia.com true http://www.bkjia.com/PHPjc/752537.html techarticle deprecated:function Ereg () is sometimes present in the php5.3 environment () is deprecated in ... and Deprecated:function ereg_replace () is a deprecated in ... These types of error alerts. PHP 5.3 ere ...