Doc #80486 [Ver->Csd]: Undocumented backward incompatible change between 7.4.8 and 7.4.9
| From: | phpdocbot@php.net | Date: | Mon, 28 Dec 2020 14:08:13 +0000 |
| Subject: | Doc #80486 [Ver->Csd]: Undocumented backward incompatible change between 7.4.8 and 7.4.9 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18329@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80486&edit=1
ID: 80486
Updated by: phpdocbot@php.net
Reported by: php4fan at gmail dot com
Summary: Undocumented backward incompatible change between
7.4.8 and 7.4.9
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Scripting Engine problem
Operating System: all
PHP Version: Irrelevant
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=ef81c708faf8d64a78c103fca7d53b7f6cdfacce
Log: Fix #80486: Undocumented backward incompatible change between 7.4.8 and 7.4.9
Previous Comments:
------------------------------------------------------------------------
[2020-12-28 14:07:22] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=352241
Log: Fix #80486: Undocumented backward incompatible change between 7.4.8 and 7.4.9
------------------------------------------------------------------------
[2020-12-05 12:48:26] cmb@php.net
Like Dan said, the behavioral change is caused by fixing that bug,
but passing the result of an internal function call to a by-ref
parameter shouldn't have worked in the first place. I agree that
this should not be documented in the migration guide, but we
rather should improve the documentation of "passing arguments by
reference"[1], which does not even mention that values should not
or must not, respectively, passed to reference parameters.
[1] <https://www.php.net/manual/en/functions.arguments.php#functions.arguments.by-reference>
------------------------------------------------------------------------
[2020-12-04 22:11:38] danack@php.net
Possibly from the fix for bug #79783
https://github.com/php/php-src/commit/971e5c5186a2a2339b0dbad4f2a057a9deed5aa2
Although your example doesn't crash, it was only working by coincidence, rather than being a
safe thing to do.
------------------------------------------------------------------------
[2020-12-04 19:31:59] danack@php.net
Hey Teo,
The migration guide is for migrating between versions that are meant to have changes.
There is also list of bug fixes for each version: https://www.php.net/ChangeLog-7.php#PHP_7_4
but I can't currently see it listed....which is not good.
There should be an entry for it as it is definitely different behaviour, so thanks for reporting it.
------------------------------------------------------------------------
[2020-12-04 19:17:06] php4fan at gmail dot com
Description:
------------
---
From manual page: https://php.net/migration74.incompatible
---
Something has changed between 7.4.8 and 7.4.9 that affects passing parameters to a function by
eference.
Leaving aside the fact that such bc-breaking changes shouldn't be introduced between sub-minor
versions (i.e. from x.x.y to x.x.z) to begin with, this change is not documented.
I would expect to find it here:
https://www.php.net/manual/en/migration74.incompatible.php
(given that there is not a section named "migrating from 7.4.8 to 7.4.9)
The script below runs without errors or warnings in all versions <= 7.4.8 (including ancient
ones), and causes fatal errors starting from 7.4.9
See https://3v4l.org/SMK9U
Test script:
---------------
<?php
function test(&$value) {
echo $value;
}
test(intval(3));
Expected result:
----------------
bc-breaking change should be documented
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80486&edit=1