Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82977 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75525 invoked from network); 17 Feb 2015 15:56:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2015 15:56:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; 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:56047] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/D1-19463-1B463E45 for ; Tue, 17 Feb 2015 10:56:34 -0500 Received: (qmail 8146 invoked by uid 89); 17 Feb 2015 15:56:30 -0000 Received: by simscan 1.3.1 ppid: 8136, pid: 8143, t: 0.0753s 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; 17 Feb 2015 15:56:30 -0000 Message-ID: <54E364AE.8090907@lsces.co.uk> Date: Tue, 17 Feb 2015 15:56:30 +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: <011801d04a07$83ab1c00$8b015400$@php.net> <016f01d04a3a$e9183220$bb489660$@php.net> <022801d04ab1$4a0c47d0$de24d770$@php.net> <1913e09d7f52541901d8574d2080a63f@mail.gmail.com> <54E35855.4060906@lsces.co.uk> <025a01d04ac6$b3cd7170$1b685450$@php.net> In-Reply-To: <025a01d04ac6$b3cd7170$1b685450$@php.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Reviving scalar type hints From: lester@lsces.co.uk (Lester Caine) On 17/02/15 15:30, François Laupretre wrote: >> Returning 'not-zero/empty' as true and 'zero' as false is one of the >> > natural things to use in PHP and I don't think any other language has >> > that flexibility? > You didn't read it right. > > I was talking of conversions *from* bool, not *to* bool. (int -> bool) is fine and will be preserved, but I propose to remove (bool -> int). You will still return numbers as bool, and non-zero will still be converted to true. Relax :) My current practice up until now has been to use 'return false' when an action failed, but the main return would be a number of records or string of data. So you are now blocking that activity ... I'm reading to right, but you are not thinking all possibilities through. But I think I'm starting to see it broken already with the other changes to the core :( I'm not returning 'IS_FALSE' so I'm probably going to have to change the 'false' to '0' anyway so as to avoid the bool? -- 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