How I could install an old PHP version on Ubuntu 13.04 (Raring Ringtail) -preferably version 5.3.3?
Unless you do a full recompile from sources on the 13.04 platform, I'd recommend NOT installing any pre-packaged version of an older PHP version on a later OS. The reason is that there are many incompatibilities between major releases and you'll be UNpleasently surprised when things do not work.
In any event, its going to be a hassle taking time and effort. You'll probably be forced into recompilation and reinstallation of a number of dependent packages as well to make this work. It could require a lot of effort to keep the old version as newer support packages are released and updated by the vendor as well (i.e. more recompiles and reinstalls).
Also, keep in mind that there are problems fixed in the newer version of PHP (security issues) that are not worth backtracking to an older version.
One other suggestion might be to reinstall an OS that supports the PHP version you desire as part of the distribution.
You can install php as usual, which will install 5.4, then use this script to downgrade it to 5.3:
Procedure to follow
First you need to download the shell script from above link.
Once you have php5_4_downgrade_5.3.sh file you need to change the permissions using the following command
sudo chmod 755 php5_4_downgrade_5.3.sh
Now you can run the script using the following command
sudo sh php5_4_downgrade_5.3.sh
Follow the on screen instructions It worked on Rackspace cloud Ubuntu 13.04 today!
There is a page with unsupported previous PHP versions here. I suppose that there is a README in the tarball with instructions.