php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dusk at woofle dot net
New email:
PHP Version: OS:

 

 [2020-09-16 02:24 UTC] dusk at woofle dot net
Description:
------------
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:
---------------
<?php
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.

Patches

Pull Requests

History

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] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e3d0bc0a981f11970415ab3ac635b98f6740bfb4
Log: Fixed bug #80109
 [2020-09-17 08:03 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 14:01:29 2024 UTC