为什么在PHP中不赞成`ereg`? [英] Why is `ereg` deprecated in PHP?
本文介绍了为什么在PHP中不赞成`ereg`?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么在PHP中不推荐使用ereg
?
Why is ereg
deprecated in PHP?
我有很多使用此功能的函数,现在它们总是发出警告.
I had a lot of functions which used this, now they always give warning.
这还有什么选择?
推荐答案
http ://pl.php.net/manual/en/function.ereg.php
注意:从PHP 5.3.0开始,不赞成使用regex扩展名,而推荐使用PCRE扩展名.调用此函数将发出E_DEPRECATED通知.请参阅差异列表,以获取转换为PCRE的帮助.
Note: As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. See the list of differences for help on converting to PCRE.
这篇关于为什么在PHP中不赞成`ereg`?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文