


Some errors occurred after php was upgraded to 5.3, such as ereg(); ereg_replace(); function error, eregeg_replace_PHP tutorial
Jul 12, 2016 am 09:03 AMSome errors occurred after php was upgraded to 5.3, such as ereg(); ereg_replace(); function error, eregeg_replace
often occurs when running in php5.3 environment
Deprecated: Function ereg() is deprecated in... and Deprecated: Function ereg_replace() is deprecated in... These types of error messages.
The reason is: PHP5.3 or above does not support the ereg() function, but uses the preg_match() function; it does not support the ereg_replace() function, but uses the preg_replace() function.
Solution: Just change the unsupported function to a supported function.
For example
if(eregi('^('value', $value)
Changed to:
if(preg_match('/value/', $value)
🎜> Another example:
$string = ereg_replace(' value', ' ', trim($string));
Change to:
$string = preg_replace('{ value}', ' ', trim($string));
Solution to Deprecated: Assigning the return value of new by reference is deprecated in error
After version 5.3, the "=&" symbol is no longer allowed in programs. If the error Deprecated: Assigning the return value of new by reference is deprecated in appears on your website, don’t worry. First locate the file with the error and check whether “=&” is used in the program. You will find that “=” is used. &" symbol, the program runs normally after removing the '&' symbol.
Problem: Deprecated: Function set_magic_quotes_runtime() is deprecated in The reason for this prompt is that this feature (set_magic_quotes_runtime()) has been turned off after PHP5.3.
And this feature has been completely removed in PHP6.
You can comment or delete the wrong line, or add the @ symbol in front of set_magic_quotes_runtime()

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel

Build a React App With a Laravel Back End: Part 2, React

Simplified HTTP Response Mocking in Laravel Tests

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon

Announcement of 2025 PHP Situation Survey
