|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-07 22:26 UTC] mkong at intisoft dot com
If an array is used as a default parameter value, e.g:
function foo ($arrParam = array ("a", "b", "c")
{
.
.
.
}
If the function is called without the corresponding parameter, i.e. the default parameter value is used, the parameter ($arrParam) will need to be reset first.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
<?php function foo ($arrParam = array ("a", "b", "c")) { var_dump(current($arrParam)); } foo(); ?> bool(false) The internal hash pos is set after the last element.