I started with a vendor supplied form that had php code and html all on one page. Quite a mess I thought, so I immediately used the Smarty template engine to bring some order to the party.
Then it hit me, that once you separate the php from the html, the php script could very well be a perl cgi script. They are invoked the same way from an html <form> tag. Yeah, I know how php is integrated into apache, and speed, etc.
One thing I really like about php is the support for sessions. I thought that was missing from perl until I went over to CPAN and found a CGI::Session library, that quite frankly, provides better support for sessions than php, unless I'm missing something. CGI::Session
For instance, I was on a php mailing list and a poster there wanted to know how to expire a session. Apparently in php there is no call similar to this in CGI::Session: $session->expire('+1M'); # expire after a month. Instead you have to save a timestamp as a session variable and then go test it yourself.
Plus there's like 4 functions to do what split() does. One handles only regex's, another doesn't, etc. What's up with that?
I'm just about paralyzed now, I can't work on my project any more because I don't see what php is buying me. The fun I was having with php is gone, vanished, dried up. Now I'm in questioning mode. Full of doubt. And that's why I've come to the Perl Monks.
I've read countless posts comparing php and perl. If you check out some of the php sites they want to rewrite the whole world in php (one guy even wants to replace cvs with a php hack). It feels like a purge, a re-writing of history. Friends have told me "greg, perl is old school. get with the future - learn php". :-)
Ok, there's a certain amount of humour in all this I'll admit, but I don't understand all the hype.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: php + Smarty looks like CGI
by crenz (Priest) on May 17, 2003 at 22:40 UTC | |
by Theo (Priest) on May 18, 2003 at 01:10 UTC | |
by broquaint (Abbot) on May 18, 2003 at 12:28 UTC | |
by Jenda (Abbot) on May 18, 2003 at 16:33 UTC | |
by broquaint (Abbot) on May 18, 2003 at 17:26 UTC | |
| |
by Theo (Priest) on May 20, 2003 at 04:26 UTC | |
(jeffa) Re: php + Smarty looks like CGI
by jeffa (Bishop) on May 18, 2003 at 13:58 UTC | |
Re: php + Smarty looks like CGI
by arthas (Hermit) on May 18, 2003 at 18:11 UTC | |
Re: php + Smarty looks like CGI
by Anonymous Monk on May 19, 2003 at 17:49 UTC |