Use the phpinfo() function.
Create a PHP file named "phpinfo.php". Insert the following code:
<?php phpinfo(); ?>
Upload the file your public HTML directory. Open the page in your web browser (e.g. http://example.com/phpinfo.php). It will show the version of PHP and other information. Delete the file when you're done.
Dreamhost is one of the few hosts that actually keeps their version of PHP up to date. Now if only they would update MySQL, I find myself missing some of the newer MySQL functionality.