Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108241 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76996 invoked from network); 25 Jan 2020 17:02:01 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Jan 2020 17:02:01 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5F37318050F for ; Sat, 25 Jan 2020 07:11:41 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 25 Jan 2020 07:11:40 -0800 (PST) Received: by mail-wm1-f53.google.com with SMTP id a5so2369511wmb.0 for ; Sat, 25 Jan 2020 07:11:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=QBk+iBo9g92a0sf7MLjXkDX62IiMxXcp17X6Hlid0dw=; b=ezI78oozJAPOAi0oXd67t0PRTz7UL9hknLRRmRIW5+8HS+lX5gKajC97MnDw2JbxSM iQmio9iZSfqXzUPMpz3d0/xFlFVU/bM6qc1sRP9BNeRntQ6a0SUg68HGxpt0fU3dCXME N47Y/ivblM5oTqAfmTZSIgH4MCdS2H74ddArX7XJKXJJhPjfVKURJqXy7XWiqo2wxhcE 3wvjl3guPuLp7DaQf3b8vS8838+7ZkQZcm4wMeBAtZUo8j1e+S3z95JPhRUHZoAtZSTd XAHgdUxwbTzok2iSJbM98jtcDpkVdkyJcGV37hzPs89etSjoRDhGdq5gi/k+QVwaKX7k CByw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=QBk+iBo9g92a0sf7MLjXkDX62IiMxXcp17X6Hlid0dw=; b=ftgHO6ACJXkDcnrDDUb+VOAUd+z9AtM2kdcMQKB21tcKXKE52Fge6gi/D/oJXwTWKg fHADV3ObUvbh9ysm5YLXBnkyJYbo0GUSskPOBYiUAJIWQHAu+fm9yiZ3Tj/DT0MB9QHd RnWz9JLfbJOfxH4wS9w1j0L1BpbmhDRE4P3YJF27yhZH1vLgs4YKiDMWIcpzSpeDRMRY 6zfUjZSzR3c99SU+M2xnVM7rZjcgGIIejMPP3wvhLlup9Ti/UUNAB9adGXxV0JiEeEIp qqK1qP9S7DoCMQ+NkzCazTIoZjLEZSqFZl0TrnBGDWSgJKzJLODmG7+viqW/KmB5ClCg cohg== X-Gm-Message-State: APjAAAUxrP3r7XpkeBPIOt8Yoh6JEEEwSkrhfZAbYYIIE/iJ53B9W0VU aZSH6al/r7rzn8yTn13DfeiSXcP9 X-Google-Smtp-Source: APXvYqyDTYjQRtyfpTC/wv6kNk97YchdFelnS90CJwmaGerhG08/0XaNbkayoJbBhTMFvpkHgUe8SQ== X-Received: by 2002:a1c:638a:: with SMTP id x132mr4567851wmb.43.1579965098514; Sat, 25 Jan 2020 07:11:38 -0800 (PST) Received: from [192.168.0.14] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.googlemail.com with ESMTPSA id f12sm10661069wmj.10.2020.01.25.07.11.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Jan 2020 07:11:37 -0800 (PST) To: internals@lists.php.net References: <5DC86728-1BBF-4DCA-8A6B-9B0B190DB99D@newclarity.net> <3091DC6D-E03B-4AF5-8DC6-F3B2772956BD@newclarity.net> <5d1eaf45-d888-3fe6-7c40-02b0c8c81b61@gmail.com> Message-ID: Date: Sat, 25 Jan 2020 15:11:36 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] Typed array properties V2 From: rowan.collins@gmail.com (Rowan Tommins) On 25/01/2020 00:12, Mike Schinkel wrote: > So saying "use a static analyzer" is IMO just pointing out an overall > weakness that PHP can't automatically do static analysis on its own. I'd just like to repeat that you and Rasmus are in agreement here. He didn't say "PHP doesn't need to change because static analyzers exist", he said: > it would be amazing to have a static analyzer built into PHP > ... but that is a huge task and goes way beyond just this particular check. Choosing whether that analysis runs automatically during server startup, or as a separate command-line script, is just one detail among many. It probably wouldn't make much difference to the rest of the analysis code, and it might even make sense for it to support both modes. For instance, it might be optional for command-line scripts, so you could have options for "analyse and run", "run only", and "analyse only". > One of the main strengths of PHP — and IMO one of the reasons for its incredibly marketshare — is the ease with which PHP code can be written, tested, and deployed. > And that ease translated to ubiquity. > Adding a recommended build step to that in order to gain correctness weakens that value proposition and threatens future ubiquity as other language improve. Yes, the convenience of having something run automatically is definitely worth considering, as long as it doesn't introduce new delays and rules that get in people's way. It partly depends what kind of checks were being done, I guess, and therefore how much time it would take to run, and how much of a project it would need to analyse at once. Regards, -- Rowan Tommins (né Collins) [IMSoP]