Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24459 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3559 invoked by uid 1010); 18 Jul 2006 10:42:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3544 invoked from network); 18 Jul 2006 10:42:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2006 10:42:22 -0000 X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:3920] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 78/1C-11992-B0BBCB44 for ; Tue, 18 Jul 2006 06:42:21 -0400 Received: (qmail 5363 invoked from network); 18 Jul 2006 10:41:21 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 18 Jul 2006 10:41:21 -0000 Message-ID: <44BCBB06.3040707@zend.com> Date: Tue, 18 Jul 2006 13:42:14 +0300 User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: Michael Wallner CC: internals@lists.php.net, Ilia Alshanetsky , Lukas Smith , Marcus Boerger , zeev@zend.com, Andi Gutmans References: <97.00.12962.7DE73B44@pb1.pair.com> <44B38343.9030403@zend.com> <44.90.38316.ED1C3B44@pb1.pair.com> <1074809844.20060711203909@marcus-boerger.de> <44B41558.1060101@php.net> <44BB607F.1090403@php.net> <44BCBA2F.3050705@php.net> In-Reply-To: <44BCBA2F.3050705@php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: More valuable error message handling From: antony@zend.com (Antony Dovgal) On 18.07.2006 13:38, Michael Wallner wrote: > Ilia Alshanetsky wrote: >> Looks good to me, although I'd prefer you returned an associated >> array rather then an object. > > What for do we have object dereferencing then? As gimmick or buzzword? Definitely not for returning errors. Array perfectly fits here. > $err = error_get_last(); > echo $err["message"]; > > vs. > > echo error_get_last()->message; And if there was no error before that - what would you get? > One can still cast the stdClass instance to an array. -- Wbr, Antony Dovgal