I was poking around PHPs casting mechanism, and ran into an odd case when casting an array as an object
$o = (object) array(\'1\'=>\'/foo/bar\');
$o =
I think you get an error because casting an integer key of an array to an object / subobject will break the naming conventions of PHP varibles.
Tips:
OBJECT or an ARRAY