Apache 无效的数组索引在php7 nginx phpfpm配置中未失败
在运行apache和mod_php的php5机器上使用以下代码会导致预期的无效索引错误,但在php7 nginx上与phpfpm一起使用则不会Apache 无效的数组索引在php7 nginx phpfpm配置中未失败,apache,nginx,php-7,php-5.6,Apache,Nginx,Php 7,Php 5.6,在运行apache和mod_php的php5机器上使用以下代码会导致预期的无效索引错误,但在php7 nginx上与phpfpm一起使用则不会 <?php $test = []; echo $test['hello']; 问题在于,创建我正在使用的docker容器的人在应该是error\u reporting=E\u error的时候设置了error\u reporting=E\u ALL&~E\u depuricated&~E\u STRICT。这可以防止抛出无效索引错误
<?php
$test = [];
echo $test['hello'];
问题在于,创建我正在使用的docker容器的人在应该是error\u reporting=E\u error
的时候设置了error\u reporting=E\u ALL&~E\u depuricated&~E\u STRICT
。这可以防止抛出无效索引错误