|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-01-15 21:58 UTC] bobwei9 at hotmail dot com
[2013-01-16 01:15 UTC] johannes@php.net
-Status: Open
+Status: Duplicate
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 19:00:02 2025 UTC |
Description: ------------ Introducing a dummy variable assignment in function arguments where a reference is expected should be a reasonable workaround for the limitation that only variables can be passed as reference. But, it causes a StrictStandards warning. Separating it into two statements: $dummy=0; foo($dummy); of course works. Test script: --------------- <? function foo(&$a){ } foo($dummy=0); Expected result: ---------------- No warning. Actual result: -------------- Strict Standards: Only variables should be passed by reference in .. on line 4