I've been thinking about extending PHP's cast syntax to user-defined types,
e.g. not only (int)$foo but also (MyClass)$foo. Currently, a T_STRING in
parentheses is always treated as a constant - would it be acceptable to
hijack this syntax when used in unary operation context, i.e. "(" T_STRING
")" expr? If not, any other alternatives?

-- 
Best regards,
Max Semenik

Reply via email to