Which php.ini?

A hard thing for me to figure out when first using php from the command line was that it uses a different php.ini than apache does,and can even be a different version of php. It was also hard to figure out what php.ini was loaded. Here are some useful commands if you find yourself in this situation:
php -- (tells you which php.ini it's using and where it is, and any additional .ini files parsed)
php -v (php version number)
which php (shows the location of the php executable)
man php (learn all the options for php from the cli)