$myArray = []; array_push($myArray, (object)[ 'key1' => 'someValue', 'key2' => 'someValue2', 'key3' => 'someValue3', ]); return $myArray;