|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80109 Cannot skip arguments when extended debug is enabled
Submitted: 2020-09-16 02:24 UTC Modified: 2020-09-16 04:23 UTC
From: dusk at woofle dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 8.0.0beta3 OS: any
Private report: No CVE-ID: None
 [2020-09-16 02:24 UTC] dusk at woofle dot net
When running PHP with the -e ("Generate extended information for debugger/profiler") option, arguments with default values cannot be skipped using named arguments.

Test script:
function f($a = "hello", $b = "nobody") {
    print "$a $b\n";

f(b: "world");

Expected result:
The script should behave identically (printing "hello world") when running with and without "-e".

Actual result:
Fatal error: Uncaught ArgumentCountError: f(): Argument #1 ($a) not passed

when running with -e.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-16 04:23 UTC] dusk at woofle dot net
FWIW: This bug is caught when running the Zend/tests/named_params/ test suite with "-e".
 [2020-09-17 08:03 UTC]
Automatic comment on behalf of
Log: Fixed bug #80109
 [2020-09-17 08:03 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 20:01:30 2024 UTC