I know that in C# you can nowadays do:
var a = new MyObject { Property1 = 1, Property2 = 2 };
Is there something like that in PHP t
I suggest you use a constructor and set the variables you wish when initialising the object.