Why not just enhance get_class() function to accept the object itself
(not only the instance)?

This means:
- No new keyword
- No magic Foo::__MIRACLEHERE__
- No 50 pages documentation to help user



Hi,

You can't do this. get_class(SomeClass) would attempt to pass constant named SomeClass to the function.

In PHP you can have constant/function/class of the same name and the only way to tell them apart is context.

It needs to be either a magic constant or a language construct.

Regards,
Stan Vassilev

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

Reply via email to