加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > PHP > 正文

PHP中的“函数split()已被弃用”?

发布时间:2020-05-25 09:55:55 所属栏目:PHP 来源:互联网
导读:$stringText = [TEST-1] test task 1 Created: 06/Apr/11 Updated: 06/Apr/11; $splitArray = split( ,$stringText); Deprecated: Function split() is deprecated in C:wampwwwRSS.php on line 27 为什么这个错误

$stringText = "[TEST-1] test task 1 Created: 06/Apr/11  Updated: 06/Apr/11"; 
$splitArray = split(" ",$stringText);

Deprecated: Function split() is deprecated in C:wampwwwRSS.php on line 27

为什么这个错误发生?

http://php.net/manual/en/function.split.php

从手册

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.

我想你应该使用替代的preg_split().或者如果您不使用正则表达式,只需使用爆炸

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读