Re: [PHP-DEV] [RFC] [VOTE] Deprecations for PHP 8.6

Tim Düsterhus <[email protected]> Thu, 30 Jul 2026 17:21:31 +0200
Newsgroups gmane.comp.php.devel
Message-ID <[email protected]>
Hi

On 2026-07-27 15:22, Kamil Tekiela wrote:
> removing the redundant parameter. By removing the parameter we cannot
> break any userland code, so modifying the warning message won't help
> with anything.

For native functions passing parameters in excess of the function’s 
arity will throw an `ArgumentCountError`:

     php > define('X', 'X', true, 'extra');
     PHP Warning:  Uncaught ArgumentCountError: define() expects at most 
3 arguments, 4 given in php shell code:1

Making it explicit (and deciding) that the parameter will go in PHP 9 is 
a good thing.

Best regards
Tim Düsterhus