Question

I have been scouring the internet trying to find the answer to this, and either I have come to the conclusion that PHP cannot be setup this way, or that I am not searching correctly.

In many other programming languages, to access a lot of the function calls you have to import them. For example, in Python you can import math and then you can use functions like math.sqrt().

I know that PHP imports every single function that may be used when a script is called. Is there any way to change this behavior? For example, I don't need any of the imap* functions that PHP has, so can I remove them from being included unless I specifically import them? If this is possible, is it even wise?

The basis for this is to make PHP as efficient as possible on the server, and it seems that having access to unneeded resources may slow the scripts down, even if only by microseconds or milliseconds.

Thank you for any help that you can offer!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top