From your comments, looks like
php was installed either via source code or with some kind of binary distribution, but not via
To uninstall it, you should first know how it was installed!
Usually, if via source code, you should find a directory under
/usr/local/src (or your
home, or...) containing the said source code (maybe
Then it (usually!) will be enough to use
make uninstall, but you should check the source code documentation for the proper procedure.
If it was installed via a binary distribution, there might be an uninstall command (try looking in
/usr/local/bin) or you should proceed to manually delete every file/directory.
If you didn't install
php yourself, you should ask who installed it which method was used and acting accordingly.
EDIT as per comments
Looks like you installed it via source code, so to uninstall it you can try