I am thinking of writing a PHP extension library that will use the memcached library. It is trivial to simply link my library to the memcache shlib.
However, I am not sure what will happen if my (extension library) user already uses memcache on his/her website. My questions are:
- Is it possible to have (possibly different versions) of memcache on the machine?
- Is it best to statically link or dynamically link to memcache when building the extension library? (to cater for version incompatibilities - assuming memcache is backward compatible, otherwise all bets are off)
The questions basically degenerate to how may one safeguard an extension library they have written if it has a dependence on a third party file which may already be being used on the website that the extension library is going to be used on?
The question may probably be slightly ill-posed, but I hope you understand the gist of what I am asking.