Hi
Thank you, I've had another read through the RFC.
On 3/16/23 12:51, Ilija Tovilo wrote:
Let me know if anything is still unclear.
Isn't the destructor+exception example misleading? In that case the
initial value of '$x' is constant, thus it should always be known to
reflection, no?
Should the example look like this:
function foo($y) {
$x = new Foo();
static $x = $y;
}
try {
foo(42);
} catch (Exception) {}
?
Side-Note: I find the behavior of static variables that do not overwrite
existing variables extremely confusing, even without this RFC:
https://3v4l.org/ApIcA. Anyone who doesn't define them at the very top
of a function deserves a special place in hell :-)
Best regards
Tim Düsterhus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php