One more possible solution:
if (!array_diff(['story', 'message'], array_keys($array))) { // OK: all the keys are in $array} else { // FAIL: some keys are not}
One more possible solution:
if (!array_diff(['story', 'message'], array_keys($array))) { // OK: all the keys are in $array} else { // FAIL: some keys are not}