How can I convert a bitcoin public key to a bitcoin address? How can I convert a bitcoin public key to a bitcoin address?

Note: I am using PHP.

Is there an existing bitcoin API or PHP-API to do that converting ?
There is a step-by-step tutorial on the Bitcoin Wiki for converting Keys. 

For testing there is a very good website, where you can put in a private or public key and its show you the result of any step: http://gobittest.appspot.com/Address

If you dont want to do those things on your own you could use Bitcore, a JavaScript API for Bitcoin. For a pure PHP Libary there are some custom user projects on github, but I didn't tested any of them.