Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75099 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93772 invoked from network); 26 Jun 2014 17:41:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2014 17:41:11 -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.199 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.199 imap11-2.ox.privateemail.com Received: from [192.64.116.199] ([192.64.116.199:57534] helo=imap10-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/47-39155-63B5CA35 for ; Thu, 26 Jun 2014 13:41:11 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id AECEE8800EE; Thu, 26 Jun 2014 13:41:07 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap11.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap11.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zm0ikOcsdTLo; Thu, 26 Jun 2014 13:41:07 -0400 (EDT) Received: from [192.168.0.15] (unknown [90.210.122.167]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 523FA8800ED; Thu, 26 Jun 2014 13:41:04 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: <53AC597E.9090904@gmail.com> Date: Thu, 26 Jun 2014 18:40:58 +0100 Cc: PHP Internals , Chris Wright Content-Transfer-Encoding: quoted-printable Message-ID: References: <1CA68980-7451-4E28-AD4F-ED120393E131@ajf.me> <7807D11E-BE36-43AF-9E6E-854BE2B0C08D@ajf.me> <53AC0E2B.1070002@gmail.com> <53AC597E.9090904@gmail.com> To: Rowan Collins X-Mailer: Apple Mail (2.1878.2) Subject: Re: [PHP-DEV] [DRAFT][RFC] Big Integer Support From: ajf@ajf.me (Andrea Faulds) On 26 Jun 2014, at 18:33, Rowan Collins wrote: > Chris Wright wrote (on 26/06/2014): >>> I'm assuming if bigint keys were available, PHP_INT_MAX would still = have the >>> same value, but PHP_INT_MAX + 1 would become a valid key, making = this work >>> transparently. >> PHP_INT_MAX would probably need to be renamed (i.e. deprecated and >> replaced) because it would become a misnomer - the max*PHP* int is = no >> longer known because it is limited only by memory. >=20 > An interesting thought. Is there really much value in renaming it = though? It would cause a compatibility break (once the deprecation = period expired) for something which could easily be covered by = documentation. If done right, the BigInt support would simply make the = constant unnecessary in the majority of cases. Right. Myself, I=92m in favour of keeping PHP_INT_MAX around. The name = might be misleading, but it=92s still important in a few places. So long = as the documentation makes this clear, it=92s not a problem. Actually, I=92d like to add a new constant perhaps, PHP_INT_MIN. It = seems silly that we have a _MAX yet no _MIN despite having signed = integers, especially since your minimum can=92t be typed as a literal = (longstanding bug, one that bigints happen to =93fix=94 as it would be a = bigint, but it should really be a long), and it=92s -(PHP_INT_MAX - 1) = not -PHP_INT_MAX. > It's also not entirely clear to me what it could be renamed *to* which = was any more appropriate. PHP_LONG_MIN perhaps, but so far as user land cares, long and int are = synonyms. I don=92t want to rename it, anyway. -- Andrea Faulds http://ajf.me/