If speed really is key i'd say Perl, otherwise I would just stick to PHP. Ruby and Python are nice for writing code really fast in but Perl / PHP execute much faster.
Unscientific as it could be, this test shows speeds comparable or better for python:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all...
[lines going right are better for python, the ones going left are better for php]
I don't mean to bring this as proof of any sort, but also according to my own experience python scripts outperform php ones.