Cast an array to an object in PHP

If, for a reason or another, you want to convert an array into an object, PHP will let you cast it.

$myObject = (object)myArray;

It's a dirty, dirty thing to do, but it works.