On Mon, 7 Jan 2013, nat...@starin.biz wrote: > I wanted some thought from you guys about the idea of giving PHP scripts the > ability to read some internal information about variables such as ZVals. > > > > The idea of how this reflection class would work would be something like: > > > > Class ReflectionZVal { > > // Retains info about the variable referenced > > function __construct(&$variable);
That's inherently flawed, as passing a variable in can modify it's refcount and is_ref states. This is why Xdebug's equivalent wants a string with the variable name instead: http://xdebug.org/docs/all_functions#xdebug_debug_zval > // Returns if the referenced variable > > function valueExists(); What's a "referenced variable" here? If you pass in something, it will exist. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php