moved optional paramaters to an array in generated php code