php: assoc/array switch for payload

php: assoc/array switch for payload