Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100003 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24888 invoked from network); 22 Jul 2017 04:33:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2017 04:33:01 -0000 X-Host-Fingerprint: 62.251.31.78 monitor.xs4all.nl Received: from [62.251.31.78] ([62.251.31.78:9539] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/C9-02884-C75D2795 for ; Sat, 22 Jul 2017 00:33:01 -0400 To: internals@lists.php.net Date: Sat, 22 Jul 2017 06:32:56 +0200 Message-ID: References: X-Newsreader: Forte Agent 3.3/32.846 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Posted-By: 62.251.31.78 Subject: Re: [PHP-DEV] Re: PHP 7.2.0 Beta 1 released From: phpdev@ehrhardt.nl (Jan Ehrhardt) Rasmus Lerdorf in php.internals (Fri, 21 Jul 2017 22:15:13 -0400): >On Fri, Jul 21, 2017 at 9:50 PM, Jan Ehrhardt wrote: > >> The case: class RulesActionContainerUI has a public function form: >> > public function form(&$form, &$form_state, $options = array(), $iterator >> = NULL) { >> >> class RulesRuleUI extends RulesActionContainerUI with a public function >> > public function form(&$form, &$form_state, $options = array()) { >> >> Bad programming, but no PHP ever stumbled over it. PHP 7.2.0 Beta 1 >> issues a fatal error that RulesRuleUI::form must be compatible with >> RulesActionContainerUI::form. IMHO a valid remark, but still a BC break. >> Is this documented anywhere? Or should the Fatal Error become less >> fatal? > >This sounds strange. This hasn't changed in 7.2. It was the same in 7.1 and >7.0. Even in 5.6 and 5.5 it was an E_STRICT. Unless the Windows version has >somehow drifted, but I don't see how that would be possible. Are you sure >it isn't caused by something else? Your example issues an E_STRICT warning, in both PHP 7.2 nts x64 and PHP 7.1 nts x64, so it must be caused by something else. I have no faint idea (yet) what causes it. I am doing exactly the same: switch the config from PHP 7.1 as mod_fcgid to PHP 7.2 as mod_fcgid (or vice versa), restart Apache (2.4.27) and run 'Flush all caches'. Under PHP 7.2 I get a fatal error and under PHP 7.1 I do not even get a warning. The php.ini's are exactly the same, except for the location of the error_log. Under PHP 7.2, I am also getting a lot of warnings for deprecated things: - create_function() - each() - count() on a non-Countable variable Those were expected. But why Drupal7 transforms one warning into a fatal error beats me. Talking about bad programming, this was the weirdest each(), found in menu.inc: > list($function, $args) = each($function); each() is supposed to advance the array pointer, but for which $function? The first or the last in the statement? -- Jan