Open fredemmott opened 10 years ago
Pretty sure we already do this for __construct
(since we special case that enormously), but seems useful for the others too.
Not needed for __destruct()
, since it is gone.
Adding it to __clone()
would be a major improvement.
Tracked as hhvm/hhast#546
I've found one case of this in Facebook:
This looks like a misunderstanding about how __clone works, as it's called after a copy, instead of to actually do the copy. See http://php.net/manual/en/language.oop5.cloning.php
t5158846 for fixing the issue in Facebook.