【PHP】php7.2报错The each() function is deprecated. This message will be suppressed on furthe
php7.2以上 废除了 each()方法,项目中用到的地方会出现以下报错
The each() function is deprecated. This message will be suppressed on further calls
解决办法。很简单
while (list($key, $val) = each($array)) {
#code
}
改为
foreach ($array as $key => $val) {
#code
}
【PHP】php7.2报错The each() function is deprecated. This message will be suppressed on furthe的更多相关文章
- linux下, 再次遇到使用thinkphp的模板标签时,报错used undefined function \Think\Template\simplexml_load_string() 是因为没有安装 php-xml包
linux下, 使用thinkphp的模板标签,如 eq, gt, volist defined, present , empty等 标签时, 报错: used undefined function ...
- selenium的报错信息:selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Compound class names not permitted
报错信息:selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Compound class ...
- 支付宝支付php的demo或sdk报错 Warning: openssl_sign() [function.openssl-sign]: Unknown signature algorithm. in
最近在做支付宝支付,在本地测试一切正常,上传到服务器就遇到报错: Warning: openssl_sign() [function.openssl-sign]: Unknown signature ...
- PHP7.1 报错 Warning Illegal string offset
报错如下: Warning: Illegal string offset '阿根廷' in F:\wnmp\www\test.php on line 24 Warning: Illegal strin ...
- ajax jsonp请求报错not a function的解决方案
概述 最近工作中使用ajax,有时会报json4 is not a function的错误,有时又不会报错.找了很久,网上说是因为多次请求同一个资源导致的,但是我检查了自己的代码,对于重复资源并没有重 ...
- mysql 5.7 创建函数报错,This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creat
今天用命令创建函数, 报错 This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration ...
- laravel 5.5 运行在 php7.0 报错 Symfony\Component\Translation\Translator.php FatalThrowableErrorParse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
问题描述 报错原因是 php-cli 版本是 7.1.x,运行 composer create-project ... 命令时安装的依赖包会自动适配到当前 php 版本 7.1.x.如果 php-fp ...
- 报错:Sqoop2 Exception: java.lang.NoSuchMethodError Message: org.apache.hadoop.security.authentication.client.Authenticator
报错过程: 进入sqoop2之后, 输入命令:show connector,报错 报错现象: Exception has occurred during processing command Exce ...
- Python3+selenium 报错处理:“selenium.common.exceptions.NoAlertPresentException: Message: No alert is active”
一.说明 在使用python3+selenium写自动升级程序的时侯,碰到一个弹出对话框需要点击确认的场景.弹出的对话框如下图所示. 对于弹框各种资料都说通过switch_to.alert属性获取对话 ...
随机推荐
- 为什么在项目中data需要使用return返回数据呢?
问:为什么在项目中data需要使用return返回数据呢? 答:不使用return包裹的数据会在项目的全局可见,会造成变量污染:使用return包裹后数据中变量只在当前组件中生效,不会影响其他组件.
- HDFS的读机制
HDFS的读机制: 1.初始化FileSystem ,客户端调用FileSystem 中的open方法打开文件. 2.FileSystem 调用远程RPC服务,获取namenode上的文件的数据块信息 ...
- Java中复合赋值运算符自动进行强制类型转换
public class Operation { public static void main(String[] args) { int num1 = 10; num1 = num1 / 2.2; ...
- mysql模糊查询多个字段
SELECT * FROM nst_t_conferencehis WHERE ConferName REGEXP '军工|军资';
- Ubuntu下彻底卸载默认安装的mysql,自己手动下载安装MYSQL
彻底卸载: sudo apt-get autoremove --purge mysql-server-5.7 sudo apt-get remove mysql-common sudo rm -rf ...
- 35、sparkSQL及DataFrame
一.saprkSQL背景 Spark 1.0版本开始,推出了Spark SQL.其实最早使用的,都是Hadoop自己的Hive查询引擎:但是后来Spark提供了Shark:再后来Shark被淘汰,推出 ...
- Java 日期工具类(日期,月份加减等)--转
package util; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.C ...
- macos high sierra 删除多余的管理员的步骤
自己查看了好多文档, 一个比较可靠的地址有两个,不过发现跟我的不一样, 我没有采用. 也在这里贴出来, 供需要的"折腾者"们看看. [某个外国大大的方法] (https://med ...
- 深入浅出MYSQL数据库—思维导图[附下载链接]
源文件下载地址:https://github.com/JluTiger/schoolRecruit2020
- 中山纪中集训Day4双是测试(划沝) 九校联考-DL24凉心模拟Day2
A组T1 锻造 (forging) 1.1 题目背景 勇者虽然武力值很高,但在经历了多次战斗后,发现怪物越来越难打于是开始思考是不是自己平时锻炼没到位,于是苦练一个月后发现......自己连一个史莱姆 ...