|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-07-14 12:05 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2021-07-14 12:05 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ Just a small nitpick about PHP's error reporting that I thought I'd file for completeness' sake. PHP currently says "exactly N expected" instead of "at least N expected" for functions using the ... splat/scatter operator. [I'm not seeing an existing bug for this, based on searches for "exactly" and "expected".] Test script: --------------- $ php8.0 -r 'function a($a, $b, ...$c) {} a(1);' PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function a(), 1 passed in ... line 1 and exactly 2 expected in ...:1 Expected result: ---------------- My suggestion: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function a(), 1 passed in ... line 1 and at least 2 expected in ...:1 Actual result: -------------- As noted