I'm confused.. split what out into a function? This is its own function.. php_mongo_api_write_options_from_zval