Closed
Description
Description
The following code:
error_reporting(E_ALL);
set_error_handler(function ($errNo, $errStr) {echo 'Handle ' . $errStr;});
str_contains("test", null);
new \IntlDateFormatter('en_US', 0, null);
<?php
Resulted in this output:
Handle str_contains(): Passing null to parameter #2 ($needle) of type string is deprecated
PHP Deprecated: IntlDateFormatter::__construct(): Passing null to parameter #3 ($timeType) of type int is deprecated in dep.php on line 5
Deprecated: IntlDateFormatter::__construct(): Passing null to parameter #3 ($timeType) of type int is deprecated in dep.php on line 5
But I expected this output instead:
Handle str_contains(): Passing null to parameter #2 ($needle) of type string is deprecated
Handle IntlDateFormatter::__construct(): Passing null to parameter #3 ($timeType) of type int is deprecated in dep.php on line 5
PHP Version
PHP 8.1.0
Operating System
No response