Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79650 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72510 invoked from network); 14 Dec 2014 22:09:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Dec 2014 22:09:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:34236] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/92-57297-4BA0E845 for ; Sun, 14 Dec 2014 17:09:56 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id AA4A52400D0; Sun, 14 Dec 2014 17:09:53 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id U91tMeaiQnFP; Sun, 14 Dec 2014 17:09:53 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 0E1E12400C7; Sun, 14 Dec 2014 17:09:52 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <548DFF20.6090709@gmail.com> Date: Sun, 14 Dec 2014 22:09:51 +0000 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <902427B3-319D-4730-929A-D68B81B2FCE8@ajf.me> References: <2F9B99EF-538C-4225-95A4-943F57DADF69@ajf.me> <548DFF20.6090709@gmail.com> To: Rowan Collins X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [PATCH] Consistent type names in error messages From: ajf@ajf.me (Andrea Faulds) Hey Rowan, > On 14 Dec 2014, at 21:20, Rowan Collins = wrote: >=20 > I had a go at this a few months ago, but haven't updated my patch = based on what's changed in the engine since, so it probably wouldn't = merge cleanly: https://github.com/php/php-src/pull/769 Yeah, I was inspired by your efforts. :) > An additional case which it looks like you haven't covered is "Object = of class %s could not be converted to double" in zend_operators.c and = zend_object_handlers.c: = https://github.com/IMSoP/php-src/commit/8dd601ac39a4241c9f119fd2d3e0e46474= 980a53 Good catch, I=E2=80=99ll handle that too. > Other than the awkward BC implications in gettype(), I see no reason = that the user should ever see the types labelled as "long" or "double" = in their output. >=20 > However, note that zend_get_type_by_const does get used in a handful = of non-error contexts, such as the ReflectionClass output shown in = ext/reflection/tests/bug29986.phpt = [https://github.com/TazeTSchnitzel/php-src/commit/c0ee87297298b4ff9b8d68a0= 1f8bbb99f94d9a10#diff-241] I had a grep around and couldn't see any that = were likely to cause any real concern, though. Yeah, that was the only manual test fix I did. That=E2=80=99s probably a = small BC break for those people who are parsing __toString=E2=80=99s = output. Thanks! -- Andrea Faulds http://ajf.me/