|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2016-04-16 18:00 UTC] bwoebi@php.net
 
-Status:      Open
+Status:      Assigned
-Assigned To:
+Assigned To: bwoebi
  [2016-04-16 18:36 UTC] bwoebi@php.net
  [2016-04-16 18:36 UTC] bwoebi@php.net
 
-Status: Assigned
+Status: Closed
  [2016-04-16 18:38 UTC] bwoebi@php.net
  [2016-07-20 11:32 UTC] davey@php.net
  [2018-01-18 19:24 UTC] salathe@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 21:00:02 2025 UTC | 
Description: ------------ The following works as expected (with the first parameter of test() accepting a reference) and doesn't throw a notice: test($foo = 2 /* anything not being an object */); But objects omit that notice. Seems to be a PHP 4 relict, but today this should definitely emit a notice. Test script: --------------- test($foo = new stdClass); function test(&$param) { $param = 1; } var_dump($foo); Expected result: ---------------- Notice: Only variables should be passed by reference in - on line 5 object(stdClass)#1 (0) { } Actual result: -------------- object(stdClass)#1 (0) { }