I want to be able to discover if a Debian package has been installed on our production server, the functionality should be just like extension_loaded().
Can anyone suggest a method? I can only assume I should use exec() and parse return value for ‘command not found’, I’d like to know if there’s a safer / better option though.
If you have permission to exec, then you could use one of the following: