2010/5/22 Ilia Alshanetsky <>

> Felipe,
> The idea behind the more complex logic was to allow people to have
> Int/String/etc... class names, which if we make the types reserved keywords
> will no longer be possible and break existing code.
I didn't knew that plan. Anyway, it can be done by matching the type name in
the case-sensitive way.

-<ST_IN_SCRIPTING>("string"|"binary"){TABS_AND_SPACES}[ \t&]+"$" {
- yyless(6);
+<ST_IN_SCRIPTING>('string'|'binary') {

class String { }
function f(string $a){}
f(new String); // Catchable fatal error: Argument 1 passed to f() must be of
the type string, object given ...

Felipe Pena

Reply via email to