Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83932 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 264 invoked from network); 26 Feb 2015 22:28:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2015 22:28:21 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:45863] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/F2-32582-20E9FE45 for ; Thu, 26 Feb 2015 17:28:19 -0500 Received: (qmail 4796 invoked by uid 89); 26 Feb 2015 22:28:15 -0000 Received: by simscan 1.3.1 ppid: 4789, pid: 4792, t: 0.0793s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.189.147.37) by mail4.serversure.net with ESMTPA; 26 Feb 2015 22:28:15 -0000 Message-ID: <54EF9DFF.3030000@lsces.co.uk> Date: Thu, 26 Feb 2015 22:28:15 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <3d639901ae85227b219e7ee59b3140fe@mail.gmail.com> <2a8b6b586398939a6cc6e5ad0ed67924@mail.gmail.com> <172c4fd82ac7b6fba7b1aec1e01b15fc@mail.gmail.com> In-Reply-To: <172c4fd82ac7b6fba7b1aec1e01b15fc@mail.gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] A different user perspective on scalar type declarations From: lester@lsces.co.uk (Lester Caine) On 26/02/15 21:28, Zeev Suraski wrote: >> Yes, the database use case and exterior data has been my main concern over >> > the type hint proposals. Now, this could also be changed (fixed, etc) on >> > a >> > different layer (aka database extensions to deal with native types) but >> > that is >> > likely far more to bite off than one would want at this point. It is >> > relatively >> > painless to go in and cast all of those types but the amount of code out >> > there >> > which people are going to just 'expect' this to work will be fairly large >> > and >> > one of those cases that will possibly be cause for migration concerns. > Thanks a lot for the input! We'll reconsider accepting "1"/"0" as valid > Booleans as the original proposal did. Using a 'char' or other binary field type as multiple boolean flags also resolve to 1 and 0 when pulled apart. The debate from the other side is if there is a need for a 'boolean' field type. http://www.firebirdmanual.com/firebird/en/firebird-manual/2/simulating-boolean-in-firebird/51 and http://www.firebirdfaq.org/faq12/ show some options used to get around the various input problems. So like PHP - no agreement on what BOOL is. FB3.0 is still in development, but adds a bool field for which IS_TRUE and IS_FALSE are not a comfortable fit because for any database a field can have a value or be null (not set) ... this therefore requires using a zval other than IS_TRUE/IS_FALSE to store a boolean value properly! -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk