On Tue, Apr 17, 2012 at 9:36 PM, Galen Wright-Watson <ww.ga...@gmail.com> wrote: >Would it be easy to have a patch that simply allows use of the class name, > or is the "::class" suffix necessary to resolve some ambiguity? Example > usage: > > $mock = $this->getMock(A\Namespaced\**ClassName); > # or > use A\Namespaced\ClassName; > $mock = $this->getMock(ClassName); > > 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. In your above example ClassName could just as well be a constant :)
Nikita -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php