Using the correct algorithms and datastructures is much more relevant to the performance than using a certain programming language (as long as it's possible to express them in the chosen language).
So PHP can be even faster than C++ if the PHP-programmer knows what he's doing.