views:

1824

answers:

2

I program mostly in PHP and have a site along with other samples in ASP I need to convert over to PHP. Is there some kind of "translator" tool that can either enter lines of code or full slabs that attempts to output a close PHP equivalent?

Otherwise, is there an extensive table that lists comparisons (such as design215.com/toolbox/asp.php)

+2  A: 

It isn't perfect, but this will convert most code.

Abinadi
My laughing at the question was instantly cut short by your response. I'm amazed such a tool exists.
Gerry
I did think it was a tall ask and wasn't interested in a direct working conversion, just something that would explain some of the unknown syntax etc and this tool does exactly that.
Peter
A: 

I think this is a poor way to do it. Sure, a quick-reference table helps a little. But really you need to be fluent in both ASP and current PHP best practices, and envision what a good PHP design would be. The naive transliteration will just give you PHP code that thinks it's ASP. A true port will be easier to understand and maintain.

Matthew Flaschen
I understand this is a poor way of doing it but for me it's simply to understand more easily how the old code or sample works to go ahead and implement in PHP.
Peter