Actual complaint about #PHP: you can't typecast classes.
That is, you can't treat an object of Class1 as being an object of Class2 (so as to have access to additional/different functions (methods) for handling its data)...
...even if Class2 is a descendant of Class1.
...unless that has changed since the last time I tried it.
@woozle it won't change because there's only the Object type. You can hack this, though.
@oreolek I've settled for just copying the data over to a new object... but I do miss the class-casting in C++ and (I think) Object Pascal.
A Mastodon instance for cats, the people who love them, and kindness in general. We strive to be a radically inclusive safe space. By creating an account, you agree to follow our CoC.