Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83126 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56769 invoked from network); 18 Feb 2015 21:57:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 21:57:59 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.174 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.160.174 mail-yk0-f174.google.com Received: from [209.85.160.174] ([209.85.160.174:62862] helo=mail-yk0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/7C-25021-6EA05E45 for ; Wed, 18 Feb 2015 16:57:58 -0500 Received: by mail-yk0-f174.google.com with SMTP id 9so2379637ykp.5 for ; Wed, 18 Feb 2015 13:57:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GDwxGXGyh+xk47+yqAyQ2gIyNkBtU9K5rOc9Tk5JUR0=; b=M+mc+STLalFMVeHP4B2mVYAeFK7sAI3Ee2BCbJCuRhtgs6iNPycsZcAbE7QIFBsm8z AUpd7eohH4hihXpXtLbxMkU0SmlSSKdt0/4PfyxWqaxWr4QkP/XX2NHzZbBA7ZRP+BfW wGxEeT9RQ1V1f8GvQe3v36ofP9ER79NENTruM81QZqKU9lwGvHOgBFyQMK3VA+y1dnVX qAUUocQfwssmMapcdr1wB+R9/UFUXfcWnBbADz7a29A1pBWGXKmoMmAsosdXgPi9eQD4 wMISejUoEVy6wlOkzOaDW/yWOoytD5LC4Mp82n0v95HUVWhfTlqysVhh+K0/Q3YhQ7P9 /O9g== MIME-Version: 1.0 X-Received: by 10.220.100.6 with SMTP id w6mr886118vcn.65.1424296675616; Wed, 18 Feb 2015 13:57:55 -0800 (PST) Received: by 10.52.179.168 with HTTP; Wed, 18 Feb 2015 13:57:55 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Feb 2015 21:57:55 +0000 Message-ID: To: Anthony Ferrara Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC-Discuss] Scalar Type Declarations v0.5 From: leight@gmail.com (Leigh) On 18 February 2015 at 21:50, Anthony Ferrara wrote: >>> Static Analysis Is Possible With Weak Declarations >> >> The advocacy of allowing `accepts_float(returns_int());` doesn't help >> the cause of static analysers in strict mode. > > Java does exactly this and is statically analyzable. So...? As discussed elsewhere. You're absolutely right, it is up to the analyser to throw a warning on this because it is a type-based conversion rather than value based one.