note 86443 added to function.array-multisort
| From: | ispdotphpatspspftdotde at osu1 dot php dot net | Date: | Sun, 19 Oct 2008 12:44:04 +0000 |
| Subject: | note 86443 added to function.array-multisort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145487@lists.php.net to get a copy of this message | ||
I would like to report a kind of confusion that arose with the message
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference,
modify the declaration of array_multisort(). If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file...
from a line like this:
array_multisort (&$keyarr, &$arr );// sort against this keys
This message is not easily switched off by changing the error reporting level because it's
produced at parsinig time -- not execution time.
I think this message is misleading because the arguments are passed by reference ANYWAY in
array_multisort.
Anybody encountering this message should know that nothing has to be done, except deleting the
ampersands (&).
I was tricked by this message because of couse I wanted to have the *sorted* array back. And
couldn't find the ini file nor the declaration of array_multisort.
I think in this description of array_multisort the call by reference should be listed in the
definition.
Hope this helps someone
----
Server IP: 212.124.37.9
Probable Submitter: 217.238.14.190
----
Manual Page -- http://www.php.net/manual/en/function.array-multisort.php
Edit -- https://master.php.net/note/edit/86443
Del: integrated -- https://master.php.net/note/delete/86443/integrated
Del: useless -- https://master.php.net/note/delete/86443/useless
Del: bad code -- https://master.php.net/note/delete/86443/bad+code
Del: spam -- https://master.php.net/note/delete/86443/spam
Del: non-english -- https://master.php.net/note/delete/86443/non-english
Del: in docs -- https://master.php.net/note/delete/86443/in+docs
Del: other reasons-- https://master.php.net/note/delete/86443
Reject -- https://master.php.net/note/reject/86443
Search -- https://master.php.net/manage/user-notes.php