|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-07 12:46 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 22:00:01 2025 UTC |
Description: ------------ Since recent version of PHP 4.3.x (event 4.4), I receive this warning : "Only variable references should be returned by reference". I get this when my function/method return reference of a object create directly by something like "return new MyObject()"; Reproduce code: --------------- class MyObject { } class MyFactory { function & create() { return new MyObject(); } } Expected result: ---------------- simple i would like to avoid tons of warning messages.