Galapagos provides static PHP 5.4 code transformation onto 5.3 compatibility syntax constructs. It's easily run on a whole vendor/ codebase, and obviously meant for backwards compatibility depending on environment constraints.
SQL::Yapp is a Perl module which embeds SQL completely and safely into Perl. It checks SQL syntax at compile time and fully parses SQL to allow usage of any Perl scalars, arrays, and hashes in an intuitive and safe way. It makes SQL injections virtually impossible while making you feel as if SQL syntax were native to Perl.