Downgrading MacPorts PHP from 5.3 to PHP 5.2

I ran into the same problem as bangpound when I wanted to downgrade from PHP 5.3 on MacPorts to Drupal 6. Although Drupal 6.14 supports PHP 5, when I set up a new install, install.php became a sea of "function ereg() is deprecated."

I don't have Macports in SVN and instead just do "sudo port install ." I was able to switch back to PHP 5.2.11 with the following:

1. sudo port deactivate php5
2. sudo port install php52 +mysql5 (this probably wasn't available when he wrote the initial blog post)
3. I thought about also doing "sudo port uninstall php5" but I figure it might be convenient to be able to switch back to PHP 5.3 at some point in the future.