Bug #80109 [Opn->Csd]: Cannot skip arguments when extended debug is enabled
| From: | nikic@php.net | Date: | Thu, 17 Sep 2020 08:03:28 +0000 |
| Subject: | Bug #80109 [Opn->Csd]: Cannot skip arguments when extended debug is enabled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229035@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80109&edit=1
ID: 80109
Updated by: nikic@php.net
Reported by: dusk at woofle dot net
Summary: Cannot skip arguments when extended debug is enabled
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: any
PHP Version: 8.0.0beta3
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2020-09-16 04:23:17] dusk at woofle dot net
FWIW: This bug is caught when running the Zend/tests/named_params/ test suite with "-e".
------------------------------------------------------------------------
[2020-09-16 02:24:07] 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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80109&edit=1