Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84077 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76031 invoked from network); 28 Feb 2015 09:24:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2015 09:24:16 -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:39888] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/72-59402-E3981F45 for ; Sat, 28 Feb 2015 04:24:15 -0500 Received: (qmail 18703 invoked by uid 89); 28 Feb 2015 09:24:11 -0000 Received: by simscan 1.3.1 ppid: 18697, pid: 18700, t: 0.0682s 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; 28 Feb 2015 09:24:11 -0000 Message-ID: <54F1893B.6030308@lsces.co.uk> Date: Sat, 28 Feb 2015 09:24:11 +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: <54F0A9C1.6050904@moonspot.net> <0bc701d05332$32fee460$98fcad20$@php.net> In-Reply-To: <0bc701d05332$32fee460$98fcad20$@php.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC From: lester@lsces.co.uk (Lester Caine) On 28/02/15 08:40, François Laupretre wrote: > My opinion, but that's only mine, is that I would favor deprecating null to scalar, even for internal functions. It would add deprecation messages but we'd end up with a cleaner code. null is a very specific 'state' for anybody working with databases. It means that no value was found. Mapping that to a default value for future processing is a job for the application rather than the data packet as returned. It ONLY needs to overridden from a default "" or 0 in cases where the simple default is not required, but on the whole the default 'case' is ALL that is needed. That null is also false in situations where a bool is required is also natural. It's now having to go through all the code and manually add these quite natural casts which is the problem here. It's not a bug or mistake, it just flows in the whole process. -- 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