Re: Undefined property notice

From: Date: Mon, 20 Aug 2007 10:48:26 +0000
Subject: Re: Undefined property notice
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-31733@lists.php.net to get a copy of this message
On Mon, 20 Aug 2007, Jakub Vrana wrote: > PHP have the Undefined variable/property notice to inform a programmer > about using uninitialized variables/properties. While both $b = $b + 5 > and $c += 5 issues the notice (and also $a["b"] = $a["b"] + 5 and > $a["c"] += 5 in case of arrays), in case of objects only $o->b = $o->b + 5 > issues the notice but $o->c += 5 not. Shouldn't be the notice issued > also with $o->c += 5? It is clearly usage of an undefined property. I'd say it should. Derick

« previous php.internals (#31733) next »