How to find the corresponding configuration files of php? I know the php's version and binary locate, but how can I found its configuration files? such as php.ini. 

aircrafts-MacBook-Pro:local ldl$ php -v
PHP 5.6.30 (cli) (built: Oct 29 2017 20:30:32) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
aircrafts-MacBook-Pro:local ldl$ whereis php
/usr/bin/php


if there are several php installed in my Mac, how can I find the corresponding one?
Run the following command from the Terminal:

/usr/bin/php -i |grep 'Configuration File'


This will tell you the path where it looks after php.ini, and the name of the loaded configuration file (if no php.ini exists where it looks for it, none might be loaded).

Change the path /usr/bin/php to the php you want to check when you have multiple versions of PHP installed.