java php object

Java
$a = array('foo' => 'bar');
$o = (object) $a;
var_dump($o instanceof stdClass); // bool(true)
var_dump($o->foo); // string(3) "bar"
Source

Also in Java: