Hi!

> I'd like to propose the addition of a ReflectionReference class, as
> described in the following RFC:
> https://wiki.php.net/rfc/reference_reflection

Do I understand correctly that the main use case here is to know if two
variables (treating this term expansively) point, by reference, to the
same zval/location? If so, I'd probably prefer a function that gives
answer to exactly this question.

Currently proposed API sounds a bit weird to me - why it's only
constructed from array element? It looks like a strange limitation.

Additionally, I'm not sure I understand whether there's a case for
"knowing whether array element is a reference to something" without it
being the use case above (i.e. comparing two things). I have no idea
what VarCloner does so it would be useful to have some clarity there.

> The TL;DR is that some libraries need a way to detect references and
> determine whether two references are the same. They previously used an ugly

Is this the same case or two different cases? Also, why do they need to
do it - what they are doing with this information afterwards?

-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to