I checked man php and output of php -h, but I didn\'t seem to find such thing.
man php
php -h
But I remember seeing it somewhere, you could do something like
To disable all by default (by ignoring php.ini) and specify specific PHP extensions, try:
php.ini
php -n $(for e in curl ctype json iconv; { echo -dextension=$e.so; } | xargs) -m
To run the script, change -m into file name.
-m