[php-src] Issue #13353: Missing deprecation when using a non optional argument with a null default value

From: Date: Thu, 08 Feb 2024 07:36:27 +0000
Subject: [php-src] Issue #13353: Missing deprecation when using a non optional argument with a null default value
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246430@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/13353 Author: nicolas-grekas ### Description See https://3v4l.org/nSpos The following code: ```php <?php function (int $a = null, $b) {}; function (?int $a = null, $b) {}; ``` Resulted in this output: ``` Deprecated: Optional parameter $a declared before required parameter $b is implicitly treated as a required parameter in /in/nSpos on line 5 ``` But I expected this output instead: ``` Deprecated: Optional parameter $a declared before required parameter $b is implicitly treated as a required parameter in /in/nSpos on line 3 ```Deprecated: Optional parameter $a declared before required parameter $b is implicitly treated as a required parameter in /in/nSpos on line 5 ``` ### PHP Version >= 8.1 ### Operating System _No response_

« previous php.bugs (#246430) next »