But napping wasn't an option, so I managed to slog back into the PHP. And in my sleep deprived state I managed to hit a kind of groove and actually cranked out some work. And now all of the basic tests are working, both the PayCash and Kiosk contexts return the expected results in all the standard cases. I'm, once again, highly pleased with myself for nailing things readily. Again most of the issues that did come up were syntax changes that got overlooked in the guts of the code. (Perl - textContent(), PHP - get_content(), etc) Mostly it was a matter of running the scripts, looking at the error message, finding the offending line, fixing it, searching in emacs for any other occurrences, saving, running the scripts, lather, rinse, repeat.
Actually it is a little more than that. See, I'm developing these scripts on a Linux box. But the cryptography object for UNIX/Linux is still not ready for PHP, my boss is working on that in C++. There is one, but it is Perl XS. So I'm testing the scripts on WinXP with the COM object version of the cryptography library. So I could've developed on WinXP - except my Linux desktop has dual heads, it is a lot more ergonomic to work on than the laptop, and I have it setup for my development like I want it already. I put emacs on XP, but I can't cut/paste between emacs windows, or emacs and any other window, which is frustrating. (I haven't had time to do more than a cursory search for a solution.) Rather than spend a lot of time tweaking the XP box, I decided to run things split. I have SecureFX on the XP box (the SFTP companion to SecureCRT - my favorite windows SSH client). So I'd modify the files on Linux, suck them down with SFTP, test, then do the modifications in Linux again, repeat. :-) I also considered setting up Samba and just mounting the drive to have direct access to the files, but it has been a few years since I've setup Samba, and never with XP. Since I was under a lot of time pressure to get this done I decided to just go with what I knew would work immediately rather than spend time relearning Samba when the time needed was indeterminate. Maybe when I get some slack time I'll do it anyway.
So once my boss is done with the cryptography port, I'll be making the tweaks to the scripts to run natively on Linux. I have to say that I rather like PHP. I haven't really done that much serious work with it in the past, but as a Perl hacker (and having some old C/C++ experience) I found it very familiar territory. I really didn't have any major difficulty in the porting, mostly a matter of learning the language syntax and limitations. It looks like PHP5 will be a nice jump up too, with one of the main limitations I hit in PHP4 resolved and the native XML support much improved.
Some of the Perl folks I know have turned up their noses at PHP in the past, but for developing web applications I think it looks like a nice system. And if you know Perl at all well, picking up PHP isn't that difficult.