Would changing the definition for class_name_scalar be sufficient?
class_name_scalar:
class_name { zend_resolve_class_name(&$1, ZEND_FETCH_CLASS_GLOBAL,
1 TSRMLS_CC); $$ = $1; }
;
To my eye, this is the least surprising syntax.
As far as I can tell, this rule will not compile as it conflicts with
other rules, namely around the namespace implementation rules.
Besides that though, an original design goal was to implement it closer
to how other languages solve the same-ish problem. This solution is
somewhat in line with Java (.class) and Ruby (.class.name), Python
actually uses the same but instead of .class, they use .__class__.__name__
-ralph
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php