You can get the configuration options for how PHP was built on the command line using php-config. It displays other helpful items as well.
php-config
php-config --configure-options
Trace: • netbsd_packages • apache_error_documents • routine_server_maintenance • perl • centos_apache_optimization • php_configuration