"功能拆分()是德precated"在PHP? [英] "Function split() is deprecated" in PHP?
问题描述
$ stringText =创建[TEST-1]测试任务1:06 /四月/ 11更新时间:06 /四月/ 11;
$ splitArray =拆分(,$ stringText);
德precated:功能拆分()是德$ P $用C pcated:\\ WAMP \\ WWW \\ RSS.php第27行
块引用>为什么这个错误发生?
解决方案<一个href=\"http://php.net/manual/en/function.split.php\">http://php.net/manual/en/function.split.php
这本手册
警告本功能已经
DE preCATED作为PHP 5.3.0的。依靠
此功能是高度气馁
请注意:
由于PHP 5.3.0,正则表达式扩展
德是$ P $赞成PCRE的pcated
延期。调用此函数将
发出E_DE preCATED通知。查看
为帮助上的差异列表
转换为PCRE。
块引用>我猜你应该使用替代
preg_split()
。或者,如果你不使用正则表达式,只需使用爆炸
$stringText = "[TEST-1] test task 1 Created: 06/Apr/11 Updated: 06/Apr/11"; $splitArray = split(" ",$stringText);
Deprecated: Function split() is deprecated in C:\wamp\www\RSS.php on line 27
Why this error happen ?
解决方案http://php.net/manual/en/function.split.php
From the manual
Warning This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged
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.
I guess you're supposed to use the alternative
preg_split()
. Or if you're not using a regex, just useexplode
这篇关于&QUOT;功能拆分()是德precated&QUOT;在PHP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!