Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is likely going to end up interned lateron at some point when the new_name is referenced somewhere. However, it may be that there are some uses that do not get interned before that. In this case we will intern a string that already have zval users, without updating the refcounted flag on those zvals. In particular this can happen with something like [Foo::class], where Foo is an imported symbol. The string it resolves to won't get interned right away, but may be interned later. use Foo as Bar; $x = [Bar::class]; var_dump(Bar::X); debug_zval_dump($x); // Will show negative refcount class Foo { const X = 1; } However, this doesn't really fix the root cause, there are probably other situations where something similar can occur.
- Loading branch information