|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-11-25 17:33 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
Description: ------------ if u try to acccess an property from a class that doesn't exists it throws a notice, but if u set a value to this property und then u try to access its ok... but that should ony if there is a __set / __get method in that class Reproduce code: --------------- class test{} $test = new test(); echo $test->bla; <-- throws a notice: ok class test{ public function __set($Key, $Value){...} public function __get($Key){...} } $test = new test(); $test->bla = 'aaa'; echo $test->bla; <-- throws nothing: ok class test{} $test = new test(); $test->bla = 'aaa'; echo $test->bla; <-- throws nothing: not ok Expected result: ---------------- first: Notice: Undefined property bla second: third: Notice: Undefined property bla Actual result: -------------- first: Notice: Undefined property bla second: third: