php object variable code example
Example 1: object php
//object init
$object = (object) [
'propertyOne' => 'foo',
'propertyTwo' => 42,
];
Example 2: php define object
$x = new stdClass();
Example 3: php object
$o= new \stdClass();
$o->a = 'new object';
OR
$o = (object) ['a' => 'new object'];