$config['max_url_length']) { respondAndExit(400, 'Bad Request'); } if (!file_put_contents($config['path_to_file'], "$url\n", FILE_APPEND)) { respondAndExit(500, 'Internal Server Error'); } respondAndExit(201, 'Created');