|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-09-27 08:03 UTC] requinix@php.net
[2013-09-27 18:46 UTC] aharvey@php.net
-Status: Open
+Status: Suspended
-Assigned To:
+Assigned To: stas
[2013-09-27 18:46 UTC] aharvey@php.net
[2015-01-11 07:35 UTC] stas@php.net
-Status: Suspended
+Status: Open
[2018-09-14 15:04 UTC] abonnementspaul at gmail dot com
[2018-09-14 15:10 UTC] requinix@php.net
-Status: Assigned
+Status: Wont fix
-Assigned To: stas
+Assigned To:
[2018-09-14 15:10 UTC] requinix@php.net
[2018-09-14 15:19 UTC] spam2 at rhsoft dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 13:00:01 2025 UTC |
Description: ------------ I think it would be useful if we could use the "default" keyword when passing parameters to a method/function so that the value for the parameter for which "default" is passed automatically takes the defined default value, without need of knowing it. Test script: --------------- For example, consider this: function justToTest($a = 10, $b = 0) { var_dump($a, $b); } justToTest(); justToTest(5); justToTest(default, 5); Expected result: ---------------- The first call should show int 10 int 0 The second call should show int 5 int 0 The third call should show int 10 int 5