facebook/hiphop-php — Issue #431: Should the __get method accept Variant?
Author: torkve
Created: 2011-11-21 16:43:51+00:00
State: open

Hi, I'm currently implementing Mongo extension for HPHP.
I've found that \_\_get method in HPHP requires a Variant as a parameter. It's stated in object\_data.h, so I see errors like this one:

../../../../../src/runtime/base/object_data.h:290: error: ‘virtual HPHP::Variant HPHP::ObjectData::t___get(HPHP::Variant)’ was hidden
ext_mongo_hphp.h:59: error: by ‘HPHP::Variant HPHP::c_Mongo::t___get(HPHP::String)’

It is strange behavior. At first, no one could provide non-string to the __get under normal conditions.
At second, PHP documentation obviously states, that __get parameter should be a string: http://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members