[php-src] Issue #7733: variable losing reference after being set in function

From: Date: Tue, 07 Dec 2021 17:08:05 +0000
Subject: [php-src] Issue #7733: variable losing reference after being set in function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238268@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7733
Comment Author: cmb69

Before $a = &$value is evaluated, the local $a and the global
$a reference the same value (null). After that reference assignment, the
local $a and the local $value reference the same value (1).
As such, the local $a looses the reference to the value null. That does
not happen with $c, because you're not assigning by-ref.


Thread (1 message)

  • noreply@php.net
« previous php.bugs (#238268) next »