echo $w->getWeather ('深圳', 'base', 'xml');会抛出参数异常
echo $w->getWeather('深圳', 'base', 'XML');会抛出参数异常,但是echo $w->getWeather('深圳', 'base', 'xml')就不会,我看下了源码是这样判断的in_array($format, ['xml', 'json'])
推荐文章: