function doSomething($options = array()) { if (isset($options['param1'])) ... if (isset($options['param2'])) ...