|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-11 08:23 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 08:00:02 2025 UTC |
Description: ------------ I made a class that has a public function. If I assign a value to the function, PHP will allow to assign a value, and if I started to retrieve the value, it will return the value. Reproduce code: --------------- /*example*/ class Field { function GetField(){ } } /*usage*/ $m_Field=new Field; $m_Field->GetField="Hello"; echo $m_Field->GetField; /* please note the absence of parenthesis*/ Expected result: ---------------- it should produce a fatal error, concerning the assigning of the data in a function; Actual result: -------------- Hello /* returns the value you have set.*/