|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-07-28 12:26 UTC] jfcherng at gmail dot com
Description: ------------ PHP 7.3.8RC1 (and 7.4snapshot) emits notices after I update symfony/var-dumper to v4.3.3 today. "zvalIsRef in vendor\symfony\var-dumper\Cloner\VarCloner.php on line 268" The variable "zvalIsRef" around VarCloner.php on line 268 is actually obviously defined. So I have much confidence this is a PHP engine's problem. After some tests, this seems to be the problematic commit https://github.com/php/php-src/commit/e7a83ec8dff962ea624508f18b9b10f5add030cc . It's parent 3fa9f9cfae2cedd7b6d26b6487dd156321243ab7 works fine in my test. I am sorry that I am not able to give a smaller test case. Test script: --------------- <?php declare(strict_types=1); // remember to set opcache.enable_cli=1 if this test is done in cli // composer require symfony/var-dumper:v4.3.3 require __DIR__ . '/vendor/autoload.php'; use Symfony\Component\VarDumper\Cloner\VarCloner; $myVar = new ArrayObject(); $cloner = new VarCloner(); $data = $cloner->cloneVar($myVar); Expected result: ---------------- no notice is emitted. Actual result: -------------- Notice: Undefined variable: zvalIsRef in vendor\symfony\var-dumper\Cloner\VarCloner.php on line 268 Notice: Undefined variable: zvalIsRef in vendor\symfony\var-dumper\Cloner\VarCloner.php on line 268 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Here is a reproducer: <?php function test($a) { // Just some dead code... if (strpos("foo", "foo") !== 0) { echo "Foo"; } $x = $a === null; if ($x) { var_dump($x); } } test(null);