Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84031 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28429 invoked from network); 27 Feb 2015 17:30:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 17:30:47 -0000 Authentication-Results: pb1.pair.com header.from=brian@moonspot.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=brian@moonspot.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain moonspot.net does not designate 108.166.43.75 as permitted sender) X-PHP-List-Original-Sender: brian@moonspot.net X-Host-Fingerprint: 108.166.43.75 smtp75.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.75] ([108.166.43.75:46192] helo=smtp75.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/DD-32582-6C9A0F45 for ; Fri, 27 Feb 2015 12:30:46 -0500 Received: from smtp18.relay.ord1c.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp18.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 71C2F280895; Fri, 27 Feb 2015 12:30:43 -0500 (EST) Received: by smtp18.relay.ord1c.emailsrvr.com (Authenticated sender: brian-AT-moonspot.net) with ESMTPSA id AB38E280804; Fri, 27 Feb 2015 12:30:42 -0500 (EST) X-Sender-Id: brian@moonspot.net Received: from Adrastea.local (71-45-12-44.res.bhn.net [71.45.12.44]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.4.2); Fri, 27 Feb 2015 17:30:43 GMT Message-ID: <54F0A9C1.6050904@moonspot.net> Date: Fri, 27 Feb 2015 11:30:41 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Benjamin Eberlei , Zeev Suraski CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC From: brian@moonspot.net (Brian Moon) > This RFC trying to simpliy and cleanup the coercison rules, having two > different conversion rules for NULL->scalar > depending on userland or internal is counter-productive and bad. The > behavior you describe as null being > empty value is wide-spread in PHP userland code as well. I agree here with Benjamin. The thing I have wanted in user land for years is to be able to build a user land function that worked the way internal functions do in terms of type checking without having to build my own type checking system. Having internal functions convert null to a scalar and not having user land do the same creates an inconsistency. For example, sometimes you want to wrap/extend an internal function (you see it a lot with json* to do encoding checking). I can't reliably take the same input to my user land wrapper that I can send to the internal function. I would prefer to see the same rules apply to internal and user land. -- Brian. -------- http://brian.moonspot.net/