Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87132 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82262 invoked from network); 13 Jul 2015 07:41:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2015 07:41:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.192.176 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.192.176 mail-pd0-f176.google.com Received: from [209.85.192.176] ([209.85.192.176:34477] helo=mail-pd0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EB/D1-43998-B8B63A55 for ; Mon, 13 Jul 2015 03:41:00 -0400 Received: by pdbep18 with SMTP id ep18so220922045pdb.1 for ; Mon, 13 Jul 2015 00:40:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=Pw2Q8tXN99XU9aS+TnSp97/Ws1NNWl/3dHRcjEwgnbY=; b=g4ALUAhqURmTPNbABCioLmpGJ1pAuYj8RKZ6rNdhXpuQc+6J+JMsXYR/KTPDjXPvhp iMBHUPlsp9AlcIVKWQ7HfucKx/jIBpqqx6EisHFby6ufc2meBDh682l1yAhfTPOX6bA2 K2+/zkZBmobCBAtSOLy1APWVhDVh5j9LdXWYCwwdTsuk23TTjY/nXlO56exWH3MLVmf1 vrk2lgkAXBnrZ/qA0fyGlV1dvNKheSnACW4VZ4nKewPHNGJ0qgkZCZAnPmIfF7vnmoaF KafTMz20/dnK8GS7WCJmK8IVr+TRWl0F9y6sr4MsKEYdevFsBcddCDEAemeVAglSrvOy vrew== X-Gm-Message-State: ALoCoQn8kBy1kD6B6OMEqhtQym3kWM2DO/yRmqs1GudA1NKwv0OZMw6tcLXVzgRO77nQsqcMeeRH X-Received: by 10.66.66.173 with SMTP id g13mr67810093pat.155.1436773256320; Mon, 13 Jul 2015 00:40:56 -0700 (PDT) Received: from [192.168.200.14] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by smtp.googlemail.com with ESMTPSA id td3sm17872787pab.46.2015.07.13.00.40.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jul 2015 00:40:54 -0700 (PDT) Message-ID: <55A36B84.2080809@lerdorf.com> Date: Mon, 13 Jul 2015 00:40:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Robert Stoll , 'Larry Garfield' , internals@lists.php.net References: <55A16375.4000707@php.net> <55A220D8.3090004@gmail.com> <55A2C1F2.8000301@garfieldtech.com> <55A30267.10204@lerdorf.com> <006201d0bd3b$da87d700$8f978500$@tutteli.ch> In-Reply-To: <006201d0bd3b$da87d700$8f978500$@tutteli.ch> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OQTIJNHJvS5JX2lsvQnEOEHTKibiBkPDp" Subject: Re: AW: [PHP-DEV] PHP7 and types From: rasmus@lerdorf.com (Rasmus Lerdorf) --OQTIJNHJvS5JX2lsvQnEOEHTKibiBkPDp Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/13/2015 12:16 AM, Robert Stoll wrote: > Another point of discussion should be how strict a property type hint w= ill be. Currently, parameter type hints are only binding for the call sid= e but not within the function body. > For instance, function foo(Foo $x){ $x =3D 1;} is perfectly valid. It c= ertainly has little sense to have the same semantics for properties but t= hen we introduce another inconsistency and should maybe fix the behaviour= of parameter type hints first. Like I said, adding type checks to every assignment is a rather large change, and I doubt it can be done without some nasty performance costs. Honestly, I would rather have a speedy runtime and put the effort into a static analysis mode built into PHP. The stated goal of so many who push the strict types everywhere argument is that it helps find bugs. So let's have an analyze mode that finds these bugs without bogging down the runtime with thousands of type checks. -Rasmus --OQTIJNHJvS5JX2lsvQnEOEHTKibiBkPDp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlWja4QACgkQlxayKTuqOuA+/wCdHkvo0SkiVdY/anj4BGpa8B3P egMAnAwGJgYs93SyidAyNzzSoukTsZaW =fih/ -----END PGP SIGNATURE----- --OQTIJNHJvS5JX2lsvQnEOEHTKibiBkPDp--