|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-12-31 22:06 UTC] mail+php at requinix dot net
[2012-12-31 22:52 UTC] bobwei9 at hotmail dot com
[2013-01-05 05:09 UTC] laruence@php.net
-Package: Scripting Engine problem
+Package: Documentation problem
[2013-01-05 05:09 UTC] laruence@php.net
[2013-01-05 10:35 UTC] bobwei9 at hotmail dot com
[2013-01-05 10:35 UTC] bobwei9 at hotmail dot com
-Type: Bug
+Type: Feature/Change Request
[2013-10-09 07:20 UTC] krakjoe@php.net
-Status: Open
+Status: Not a bug
[2013-10-09 07:20 UTC] krakjoe@php.net
[2013-10-09 07:26 UTC] datibbaw@php.net
-Status: Not a bug
+Status: Open
[2013-10-09 07:26 UTC] datibbaw@php.net
[2013-10-09 07:29 UTC] datibbaw@php.net
-Status: Open
+Status: Not a bug
[2013-10-09 07:29 UTC] datibbaw@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 06:00:01 2025 UTC |
Description: ------------ I don't know if this should be considered as a bug or as expected behaviour (=> feature request). When passing an assignment to a function which expects a variable as reference like sort(), then an E_STRICT message is issued and nothing has changed. What I want, is that a code like "sort($a = $b);" is executed in the same way as "$a = $b; sort($a);". This could help to reduce the number of little, unnecessary lines. Test script: --------------- php -r 'sort($array = [3,1,2]); var_dump($array);' Expected result: ---------------- array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } Actual result: -------------- Strict Standards: Only variables should be passed by reference in Command line code on line 1 array(3) { [0]=> int(3) [1]=> int(1) [2]=> int(2) }