Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84755 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83357 invoked from network); 14 Mar 2015 02:37:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2015 02:37:47 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.182 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.182 mail-ob0-f182.google.com Received: from [209.85.214.182] ([209.85.214.182:36311] helo=mail-ob0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E8/6E-34457-AFE93055 for ; Fri, 13 Mar 2015 21:37:46 -0500 Received: by obdfc2 with SMTP id fc2so3104584obd.3 for ; Fri, 13 Mar 2015 19:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3TwgSihvhSpw2K8jHXF474yqba8lIN9a1jQjNVU7gzg=; b=x6H+Ck2GplQXwWrEupCzf1a2vZCyH5CYBweqqvPaiT+Hr2+mMXvcwGZznomT2fxixw 8wXTtujghwUj+bUWyf5Vtk4VobIpHQ30sNF4ZY9OQE8NjYGhlVqtUoCMlVs5P+iTLTYK 7MNrluw2WB71F6qmEepF8hbOfKgI5TMehH1OqTyV+tdmnRZmnb1V/WJztcvwkO+TMMmL H3P+4y/uzICbBJSt0+bFd1EciMLXUllRTLQ5r1/3pWOQ21hvHJe1cKqBevjG8xwNFaNh Lp0OJxOa9IrrdUGRzKwBiBoLvZ9CqDZgByHSC9THjY+/eHKcCJU4J4lYoZ5tDiftCASY 2tPw== MIME-Version: 1.0 X-Received: by 10.202.184.70 with SMTP id i67mr38253149oif.68.1426300662946; Fri, 13 Mar 2015 19:37:42 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.76.90.74 with HTTP; Fri, 13 Mar 2015 19:37:42 -0700 (PDT) In-Reply-To: References: Date: Fri, 13 Mar 2015 20:37:42 -0600 X-Google-Sender-Auth: VvoZTD8tEaZ3L9-4wS4gB88TI3I Message-ID: To: Zeev Suraski , Dmitry Stogov , francois@php.net Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [VOTE][RFC] Coercive Scalar Type Hints From: levim@php.net (Levi Morrison) Zeev, Dmitry and Francois (and anyone), I have a question on a specific conversion. There has been *a lot* of email about scalar types so I apologize if this is answered somewhere already. It seems that `float -> bool` is always disallowed. If I am correct `int -> bool` is permitted for all values (not just 0 and 1), which means that floats which can be converted to integers without dataloss should also be permitted to be booleans. If a specific float can be converted to an int, and all ints can be converted to booleans, then the transitive property should hold for that float to a bool. Am I understanding the current rules correctly? If so can I get more rationale on this? Cheers, Levi Morrison