External Modules
External modules can be loaded at script runtime using the
function dl()_ This function loads a shared
object from disk and makes its functionality available to the
script to which it's being bound_ After the script is terminated,
the external module is discarded from memory_ This method has both
advantages and disadvantages, as described in the following table:
To sum up, external modules are great for
third_party products, small additions to PHP that are rarely used,
or just for testing purposes_ To develop additional functionality
quickly, external modules provide the best results_ For frequent
usage, larger implementations, and complex code, the disadvantages
outweigh the advantages_
Third parties might consider using the
extension tag in php_ini
to create additional external modules to PHP_ These external
modules are completely detached from the main package, which is a
very handy feature in commercial environments_ Commercial
distributors can simply ship disks or archives containing only
their additional modules, without the need to create fixed and
solid PHP binaries that don't allow other modules to be bound to
them_