Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60340 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52420 invoked from network); 27 Apr 2012 20:22:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Apr 2012 20:22:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=jille@quis.cx; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jille@quis.cx; sender-id=unknown Received-SPF: error (pb1.pair.com: domain quis.cx from 85.223.64.10 cause and error) X-PHP-List-Original-Sender: jille@quis.cx X-Host-Fingerprint: 85.223.64.10 10-64-223.ftth.xms.internl.net Received: from [85.223.64.10] ([85.223.64.10:54949] helo=istud.quis.cx) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/86-16466-2FFFA9F4 for ; Fri, 27 Apr 2012 16:22:12 -0400 Received: from boom-ubuntu.quis.cx (vhe-430065.sshn.net [195.169.212.153]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by istud.quis.cx (Postfix) with ESMTPSA id 8A0B810C4D; Fri, 27 Apr 2012 22:22:07 +0200 (CEST) Message-ID: <4F9AFFEE.6050102@quis.cx> Date: Fri, 27 Apr 2012 22:22:06 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: Kris Craig CC: internals@lists.php.net References: <4F9AFE3D.8010805@quis.cx> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Function boolval() From: jille@quis.cx (Jille Timmermans) On 27-04-12 22:19, Kris Craig wrote: > On Fri, Apr 27, 2012 at 1:14 PM, Jille Timmermans > Hi, > > I suggest we add a function boolval(). It simply converts the given > argument to a boolean, like strval(), intval() and floatval(). I > already have an implementation ready[1]. > > Why? > * It is missing in the current list of *val()-functions and people > expect it to exist. I'd say it is an inconsistency. > * It can be used as a callback, which is why a bool-cast does not > suffice. > > -- Jille > [1] https://github.com/php/php-__src/pull/60 > > > Do you have wiki access? If so, please post an RFC for this! You'd > have my vote. =) I don't. If anyone can give it to me I will post an RFC :) -- Jille