|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-06-18 23:28 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2015-06-18 23:28 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 12:00:01 2025 UTC |
Description: ------------ Hi guys, i received a strict error, but i`m confused what function received... Why I'm receiving a variables should be passed by reference when i use t($a=1)? the t() function received 1, or the variable $a with value = 1? Test script: --------------- <?php error_reporting(E_ALL); function t(&$a){} t($a=1); /// should not receive error!! t() received ($a=1)? or t received (1) without variable $a reference? ?> [beto@conquista2 ~]# php t.php PHP Strict Standards: Only variables should be passed by reference in /home/beto/t.php on line 5 Strict Standards: Only variables should be passed by reference in /home/beto/t.php on line 5 Expected result: ---------------- no errors Actual result: -------------- PHP Strict Standards: Only variables should be passed by reference in /home/beto/t.php on line 5