Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89908 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79781 invoked from network); 28 Dec 2015 11:34:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Dec 2015 11:34:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:27341] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/03-51216-05E11865 for ; Mon, 28 Dec 2015 06:34:40 -0500 Received: from [127.0.0.1] (unknown [82.240.16.115]) (Authenticated sender: flaupretre@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 8BB7F4B0045; Mon, 28 Dec 2015 12:34:03 +0100 (CET) To: Elijah Johnson References: Cc: internals@lists.php.net Message-ID: <56811E49.1040106@php.net> Date: Mon, 28 Dec 2015 12:34:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 151227-6, 28/12/2015), Outbound message X-Antivirus-Status: Clean Subject: Re: [PHP-DEV] Make strict mode more strict? From: francois@php.net (=?UTF-8?Q?Fran=c3=a7ois_Laupretre?=) Hi, Le 26/12/2015 21:35, Elijah Johnson a écrit : > Can you explain your statement that this would be a huge and complex > work? You must mean that there would be multiple places in the php > source code where variables are assigned? I'm not yet discussing > performance, but only the aspect of adding the feature. There may other options I don't know but, AFAIK, this implies adding an optional type hint at the zval level. This type hint should be verified at least before each conversion. Copy-on-write is an other issue, as it is currently not compatible with zval type hints. Seeing only variables with well-defined names, and focusing on arrays, only scratches the surface. Everything happens at the zval level. So, IMO, attaching type hints to variables and properties is a huge and complex work. Regards François