On Sat, 10 Jul 2021, 13:05 Benjamin Morel, firstname.lastname@example.org> wrote:
> > I've been thinking about extending PHP's cast syntax to user-defined
> > 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. "("
> > ")" expr? If not, any other alternatives?
> Hi, I proposed something similar a while back, you might want to have a
> look at this discussion:
> - Benjamin
Maybe start filling the holes for built-in types? Callable...