1$x = (object) [
2 'a' => 'test',
3 'b' => 'test2',
4 'c' => 'test3'
5];
6var_dump($x);
7
8/*
9object(stdClass)#1 (3) {
10 ["a"]=>
11 string(4) "test"
12 ["b"]=>
13 string(5) "test2"
14 ["c"]=>
15 string(5) "test3"
16}
17*/
1//create a person object in PHP
2$person=new stdClass();
3$person->firstName="Chuck";
4$person->lastName="Bartowski";
5$person->age=27;
6
7print_r($person);
8
9