PHP: find extension directory

You can find the location by calling:

php -r 'echo ini_get("extension_dir")."\n";'