obj php code example
Example 1: php create object
$x = (object) [
'a' => 'test',
'b' => 'test2',
'c' => 'test3'
];
var_dump($x);
Example 2: make a object php
$object = new stdClass();
$object->property = 'Here we go';
var_dump($object);
Example 3: object php
$object = (object) [
'propertyOne' => 'foo',
'propertyTwo' => 42,
];
Example 4: php define object
$x = new stdClass();
Example 5: java php object
$a = array('foo' => 'bar');
$o = (object) $a;
var_dump($o instanceof stdClass);
var_dump($o->foo);