Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31733 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29956 invoked by uid 1010); 20 Aug 2007 10:48:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29941 invoked from network); 20 Aug 2007 10:48:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2007 10:48:30 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.5 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.6 Received: from [82.94.239.5] ([82.94.239.5:36812] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/F0-23817-C7179C64 for ; Mon, 20 Aug 2007 06:48:29 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id l7KAmOuF009191; Mon, 20 Aug 2007 12:48:25 +0200 Date: Mon, 20 Aug 2007 12:48:26 +0200 (CEST) X-X-Sender: derick@kossu.ez.no To: Jakub Vrana cc: internals@lists.php.net In-Reply-To: <732091812.20070820122042@vrana.cz> Message-ID: References: <732091812.20070820122042@vrana.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Subject: Re: [PHP-DEV] Undefined property notice From: derick@php.net (Derick Rethans) 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