HardCoreMore Posted September 9, 2010 Share Posted September 9, 2010 Hi all, Why when i set my method to returns by reference its giving me a notice that only variables should return by reference while where is not set to return by reference it don't. Fro example: interface i { function &m(); } class a implements i { public function &m() { return $v; } } $v = new a(); $v->m(); So i just return empty $v. Is this a good practice or should i just ignore the notice Link to comment https://forums.phpfreaks.com/topic/212980-object-method-returns-by-reference/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.