PHP 7.2.0 Beta 1 released

php.internals

Sara Golemon

9 years ago
The first beta for 7.2.0 was just released and can be downloaded from: https://downloads.php.net/~pollita/ Or using the git tag: php-7.2.0beta1 The Windows binaries are available at: http://windows.php.net/qa/ Please test it carefully, and report any bugs in the bug system. The next release will be tagged on Tuesday August 1rd and released on Thursday August 3rd. Hash Values and GPG signatures can be found below and at: https://gist.github.com/sgolemon/cd9d8a2db66ef524d67a7acae2836695 Thank you, and happy testing! -Sara php-7.2.0beta1.tar.gz SHA256 hash: 82700e3c72305a5e27a4900beec1fb49c7f19048e4d8a4e512685e6e35860bff PGP signature: -----BEGIN PGP SIGNATURE----- iQItBAABCAAXBQJZbjIgEBxwb2xsaXRhQHBocC5uZXQACgkQ29s5dHDRIXKP9xAA uIKxMoV1tzPgAqWOR/6nkDgLz4jq8ps2pkixH5PVnl+GCIVhVgKswQLIQ+bGoT0v 9JQ9Nff98dL1xz74fO013Y44076H7GkLyb4S33n4OFu4iNc2k0yWYGAcGvpdXgn/ 0w9unHIaLdAwY2IU5RhszbaK0APc9WdMZ8s40tkiJ8vwi4mQq72kaKtEMj5XuJ3D ucgAOhn+ERP6lgGnpaEck/J0AAgWHlVM+HsciJB1hUAELxr1OF5vZ11cxtM50Z6M cF3QrAQoEn7mZIgpHPBIS2+yRekrg68ZtU/Y7HI6cFN/rkkCUU24oWa6lzSFWDy1 Er9F23NR5jPaG8loZAa+K267TVYuiXDLydyj6kcox8tUInulaRxeYhMOJ4QGKZwo b4u8KWRl8GH12xWgn7J4OywhqDr3g40WiUo86TIy/9CVhNZQbMa80dxQAItA2+t+ gl/Dhqp27QuHSUj/IzGCH5Y0JdNJZjWZ7WHbtzcmTGkmS7S7OtRXD12/5PS0IvEh dmmExvLRMlRZ+ytTTxollJJGtcCPP7qT8VrioRSWT5Nmd+gXmXpWD/Noo6B9Xi0V UfvLCPnMFuc1iA44pJboSfhQRg7xw6JjQKfjJzi7vuOlnTTj2T1oDc/FXtULCzzf SZkMJDs1/FFnAn2hfM+f44v5o/5Y/Rqh3ueylzgnjxs= =4DBQ -----END PGP SIGNATURE----- php-7.2.0beta1.tar.bz2 SHA256 hash: fccd93cdc087e0bf35c23a6bc47ea24a363a5336764c94418c488903b19dc414 PGP signature: -----BEGIN PGP SIGNATURE----- iQItBAABCAAXBQJZbjJAEBxwb2xsaXRhQHBocC5uZXQACgkQ29s5dHDRIXJwmQ// YGldLy8x3svhmSf/hFR57Q7hRT6HLKEDPK3Dom7rVJIVlS7xANJmoaL+4NzRt9oy JhmG3TL6iyfPcGTs9mRkCPZLZLz7MFL79jq/05Xb0jdWZtRkNAR1tl2ltALUGKLS LhPAO9gtIl4t7+foeZ/DHmiYP128vl4tHNrJEtKUxnxmGtBvoOrgIWywuDiqTIXm uJfq8PV1AKGzSjEEnxcWW3aRhFgoejnNQr2JhvzeheJkRtJJ32FQ2rs/iwwknGsV 5Thw5PyZsN7l1cxddeFkeSENjaGRziwa5lEOQVK8QDXqY1KzUFHosAfSUdSImME+ Zc4fbuc81ED16jKofCMj5JFqIl0BkLbaXK8p5HZ+wjS/M+A9XushPoXfZA/YveGB etv4AStZ3EEgigkHQ8jpJzPhFr2DOIjgCMcdzND4rDk0zoC1FJ2YOfFY3thcFl14 hpbMZP0WKWaBi+i0C0INNhB8FzQr7gxAvmHOhvc+qZoKEFPUkRuj1Lustezkq1Mm nJL+Ek0R14VxwxdHtFdf3d8coT3rOz01cIdjy8UIHoa1lIAxbu/zJ818+7ZLQlfI JV0ideqelS8qS3tTo984rvZr6pybAwPKdgrCGSqpaX6W1hVNeT8N4Ruwes+XKUAY HuPkvIzNL0od/lxM8ONiHVykvWxKCgLOSK+dnOTw0uM= =KVXS -----END PGP SIGNATURE----- php-7.2.0beta1.tar.xz SHA256 hash: 8d7d839cb20ba48f8c947ef44274ef625630f06c7e6d13f3f64b9d17205324db PGP signature: -----BEGIN PGP SIGNATURE----- iQItBAABCAAXBQJZbjJAEBxwb2xsaXRhQHBocC5uZXQACgkQ29s5dHDRIXJUkBAA oGRg4zvQ43pGhliqeFUtZ9IfW7WE+cZjzsi6DBBy92haTHXfHD8GJZxQFQCIXL2c MTmO075g+foGMWGZNDDfQoB3Vu+PO752hY6lLoMfdr1lq5e7YHFlf+l0eLMu5Yke peSMo1nk73vM2rDa7mbRBBkN94HtmXciSTMbj5YeQw2j5Is6mjIkFz9tLEYWdHZy EsHvzfrXTUPLMUmQRM7iTccLtUXVbWA/+1an7CYxJjG8N6igTFJhoT7+urR4EMeD OTus6f5FTkzvWUFbdPtA1juTuwVDnuytsU0dETAR2BzQxZZ3dDJs4y5E5fM050f/ oeYh7n/5yJimmgXifSEUfnWMPiPk3NWEyB/tBDX0bNnKPZ/Ln14y9bXSXfjR01J/ J4Ke98iXrEjw7eo+gVDzaT/8g4XP16Wwf7Z3mUKosjA4eujFPcav2ODILpUmORTt vIBpGhAnd+s+K4Xg+NrSr5KZxVfOYL4R36tkPXU5HPpg+Gg+EdbpIloPdaoa1vMD Tc/hcr9/Rh/Hfy0jn/zF90582oHtZqKYSuH1vIuHSEVoECLPn2h6izW3FksyL0HX ZHlyUjWsRgrpiMx8QVF+XjRO1VAocRqx9ACNbwxyyD7afMDOmjCICzjz0Hn5ungu q3f9odoPVOIsZY4zfXQyNKq7PHUFNUewEfAn+yamsrA= =1BkT -----END PGP SIGNATURE-----

Jan Ehrhardt

9 years ago
Hi Sara, Sara Golemon in php.internals (Thu, 20 Jul 2017 08:13:39 -0400):
>The first beta for 7.2.0 was just released and can be downloaded from: >https://downloads.php.net/~pollita/
[snip]
>Please test it carefully, and report any bugs in the bug system.
I tried running Drupal7 with 7.2.0 Beta 1 and ran into a fatal error, that does not happen under PHP 7.1.x (Windows, NTS, x64). I do not know if it is a bug, an omission in UPGRADING or me looking with my nose. Therefore I did not file a bugreport yet. 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?
-- Jan

Rasmus Lerdorf

9 years ago
On Fri, Jul 21, 2017 at 9:50 PM, Jan Ehrhardt <phpdev@ehrhardt.nl> wrote:
> > I tried running Drupal7 with 7.2.0 Beta 1 and ran into a fatal error, > that does not happen under PHP 7.1.x (Windows, NTS, x64). I do not know > if it is a bug, an omission in UPGRADING or me looking with my nose. > Therefore I did not file a bugreport yet. > > 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? eg. 10:10pm thinkpad:~/php-src> cat -n g 1 <?php 2 class P { 3 public function form(&$form, &$form_state, $options = array(), $iterator = NULL) { } 4 } 5 6 class C extends P { 7 public function form(&$form, &$form_state, $options = array()) { } 8 } 10:10pm thinkpad:~/php-src> php g Warning: Declaration of C::form(&$form, &$form_state, $options = Array) should be compatible with P::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /home/rasmus/php-src/g on line 8 10:10pm thinkpad:~/php-src> php -v PHP 7.2.0-dev (cli) (built: Jul 21 2017 22:08:10) ( NTS ) 10:10pm thinkpad:~/php-src> sudo newphp 71 Activating PHP 7.1.3-dev (cli) (built: Feb 11 2017 09:40:56) ( NTS ) and restarting php-fpm 10:10pm thinkpad:~/php-src> php g Warning: Declaration of C::form(&$form, &$form_state, $options = Array) should be compatible with P::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /home/rasmus/php-src/g on line 8 10:10pm thinkpad:~/php-src> php -v PHP 7.1.3-dev (cli) (built: Feb 11 2017 09:40:56) ( NTS ) -Rasmus

Jan Ehrhardt

9 years ago
Rasmus Lerdorf in php.internals (Fri, 21 Jul 2017 22:15:13 -0400):
>On Fri, Jul 21, 2017 at 9:50 PM, Jan Ehrhardt <phpdev@ehrhardt.nl> 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

Rasmus Lerdorf

9 years ago
On Sat, Jul 22, 2017 at 12:32 AM, Jan Ehrhardt <phpdev@ehrhardt.nl> wrote:
> 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.
Are you sure you are even running PHP 7? This type of code hasn't issued an E_STRICT since PHP 5. See: https://github.com/php/php-src/blob/PHP-7.2/Zend/zend_inheritance.c#L619-L623 -Rasmus

Jan Ehrhardt

9 years ago
Rasmus Lerdorf in php.internals (Sat, 22 Jul 2017 08:07:55 -0400):
>On Sat, Jul 22, 2017 at 12:32 AM, Jan Ehrhardt <phpdev@ehrhardt.nl> wrote: > >> 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. > >Are you sure you are even running PHP 7? This type of code hasn't issued an >E_STRICT since PHP 5.
I am sure I am running PHP 7, not sure it is E_STRICT in 7.0 & 7.1. Just misread your statement "Even in 5.6 and 5.5 it was an E_STRICT", I suppose. With the 80-character line-breaks: C:\phpdev\php72nts.x64>php ..\class.php C:\phpdev\php72nts.x64>tail -n1 \phpdev\php72nts.x64.log [22-Jul-2017 14:17:55 Europe/Paris] PHP Warning: Declaration of C::form(&$form, &$form_state, $options = Array) should be compatible with P::form(&$form, &$for m_state, $options = Array, $iterator = NULL) in C:\phpdev\class.php on line 7 C:\phpdev\php72nts.x64>php -v PHP 7.2.0beta1 (cli) (built: Jul 21 2017 19:20:33) ( NTS MSVC15 (Visual C++ 2017 ) x64 ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.2.0beta1, Copyright (c) 1999-2017, by Zend Technologies
-- Jan

Rasmus Lerdorf

9 years ago
On Sat, Jul 22, 2017 at 8:21 AM, Jan Ehrhardt <phpdev@ehrhardt.nl> wrote:
> I am sure I am running PHP 7, not sure it is E_STRICT in 7.0 & 7.1. Just > misread > your statement "Even in 5.6 and 5.5 it was an E_STRICT", I suppose. > > With the 80-character line-breaks: > > C:\phpdev\php72nts.x64>php ..\class.php > > C:\phpdev\php72nts.x64>tail -n1 \phpdev\php72nts.x64.log > [22-Jul-2017 14:17:55 Europe/Paris] PHP Warning: Declaration of > C::form(&$form, > &$form_state, $options = Array) should be compatible with P::form(&$form, > &$for > m_state, $options = Array, $iterator = NULL) in C:\phpdev\class.php on > line 7 > > C:\phpdev\php72nts.x64>php -v > PHP 7.2.0beta1 (cli) (built: Jul 21 2017 19:20:33) ( NTS MSVC15 (Visual > C++ 2017 > ) x64 ) > Copyright (c) 1997-2017 The PHP Group > Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies > with Zend OPcache v7.2.0beta1, Copyright (c) 1999-2017, by Zend > Technologies
Ok, so it is a normal E_WARNING and not the source of the fatal error you hit. You must have something else going on. Perhaps a custom error handler turning it into a fatal, although that also hasn't changed from 7.1. -Rasmus

Jan Ehrhardt

9 years ago
Rasmus Lerdorf in php.internals (Sat, 22 Jul 2017 09:22:07 -0400):
>Ok, so it is a normal E_WARNING and not the source of the fatal error you >hit. You must have something else going on. Perhaps a custom error handler >turning it into a fatal, although that also hasn't changed from 7.1.
Drupal7 has a custom error handler, but I did not expect it to differ from PHP 7.1 to 7.2. But apparently, it does. Will dig deeper. As a side note: I could reproduce the fatal error on a CentOS6 machine with PHP 7.2.0 Beta 1, so it is not Windows-only.
-- Jan