📜 ⬆️ ⬇️

Interesting PHP 5.3 bug

Today an interesting PHP 5.3 bug was found, which is present in versions from 5.3.0 to the latest 5.3.2.
And this is observed under Linux, and under Windows.
In previous versions of PHP, this problem is not observed.

So:

<?php
f(0, $$var);
$x = 1;
$y = 2;
echo $x;
function f($a, $b) {}
?>


It is logical to assume that the number 1 should be displayed. But alas, it is not so, 2 is displayed.
')
Just in case, Andrei Kostin ( www.weblancer.net/users/Lisio ), with whom we have localized this defect, reported it to the PHP bug tracker bugs.php.net/bug.php?id=52001

Does anyone know the cause of this phenomenon?

Source: https://habr.com/ru/post/95595/


All Articles