Search code examples
phpdeploymentpearpecl

Adding functions to PHP core


I have several functions that I wrote and I use regularly on my servers, is there a way I can add them to the core so I don't have to include them from external files?

I am running PHP5


Solution

  • You could add your libraries as a PEAR extension. Then you could add it to your local PEAR repository. Pear is added to the default include path in php.ini. Then you can just use "pear install myextension" on your machines.

    If these are C functions you interface with in php (php extensions) then you can do something similar with PECL.