PHP 7.2.1 计数(空)

PHP 7.2.1 count(null)

<?php
    error_reporting(E_ALL);
    count(null);
    echo "Hello World";
    count(null);

在 PHP 7.2.1 中,这将导致 PHP 警告。

PHP Warning:  count(): Parameter must be an array or an object that implements Countable in C:\inetpub\wwwroot\index.php on line 3
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in C:\inetpub\wwwroot\index.php on line 5

"Hello World" 没有得到输出。此 PHP 警告不同于普通的 PHP 警告。正常的 PHP 警告通常看起来像

警告: X 行 XPHP 中的某些 PHP 警告

我以为警告不会阻止数据输出?在我看来是这样。

运行 PHP IIS 8 上的 7.2.1 - Windows Server 2012 R2

PHP - Count

早些时候我在玩配置并启用了设置

fastcgi.logging=1;

禁用它已恢复正常错误。