I have an array which I retrieve from some other source. This array then needs to be casted into a custom class I've created.
The reason I can't use stdObject, is because my class has a custom __get
as well as a number of convinience methods.
I basically need something like this:
$obj = (MyClass) $array;
Which does not look possible, it causes a syntax error.