openrun / restcountries
dev-master
2019-02-03 21:43 UTC
Requires
- php: >=7.0.0
- ext-json: *
- guzzlehttp/guzzle: ^6.3@dev
- kevinlebrun/colors.php: 1.0.*
- phpunit/phpunit: 7
This package is auto-updated.
Last update: 2024-09-29 05:21:35 UTC
README
安装
将仓库复制到您的本地文件夹并运行命令
$ composer install
或者通过Packagist安装
$ composer create-project openrun/restcountries --stability dev
任务描述
创建一个PHP应用程序,该应用程序将列出说相同语言的所有国家,或者通过使用open rest API检查给定的两个国家是否说相同语言:
要求:
[-] PHP应用程序应该可以通过控制台执行,通过给国家名称作为参数:
$ php index.php Spain
[输出]
Country language code: es
Spain speaks same language with these countries: Uruguay, Bolivia, Argentina..
[-] 当给定两个参数时,应用程序应该告诉国家是否说相同语言
$ php index.php Spain England
[输出]
Spain and England do not speak the same language