Is there a way to automatically find out which PHP extensions are used by a particular project, do you have source code?
When porting a website from one server to another, I often wonder what PHP extensions should be enabled for the site to function properly. Yes, this use case probably does not matter if the project used Docker or had a comprehensive installation guide, but this is not always the case.
I was thinking of a script that went through all .php files and looked for specific function calls or classes, for example:
new mysqli(or mysqli_connect(: mysqliimagecreate(or imagepngor imagejpegor ...: gdcurl_init(: curl
Is there a similar script? If not, would it make sense to write it?
source
share