From: | "Erick Papadakis" <erick(dot)papa(at)gmail(dot)com> |
---|---|
To: | rod(at)iol(dot)ie |
Cc: | PFC <lists(at)peufeu(dot)com>, lawpoop(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org |
Subject: | Re: PHP sucks!! - was: persistent db connections in PHP |
Date: | 2007-06-16 21:34:03 |
Message-ID: | e9e8f77d0706161434i3547988fwab523ab6b6cdd48c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 6/17/07, Raymond O'Donnell <rod(at)iol(dot)ie> wrote:
> Having said that, the main gripes I would have with PHP are (i)
> variables aren't strongly typed, which can bite you unless you're
> careful, and (ii) you don't have to declare variables before using them,
> which can also cause trouble - in VBScript you have "option expicit"
> which forces you to declare your variables; I'd like to see something
> similar in PHP.
PHP offers this functionality already.
error_reporting(E_ALL); // This will throw E_NOTICE and E_WARNING too
E_NOTICE is what will flag when variables are not explicitly declared.
As for strong typing, I see that as a benefit, but that's a whole
different can of worms. How much value you derive from a language
depends on how you use it. After playing for years with Perl, and now
with Python and Ruby, I think PHP is still where it's at. I am not
overly into OOP, I like to use what works best. Our code is very, very
cleanly structured in fast procedural functions, and where possible,
no functions at all (because instantiating a function still takes some
processing power) and we follow something like an MVC model. And we
wouldn't touch PEAR with a borrowed pole, although we do pick out some
classes once in a while.
> Apologies if this is off-topic for this list, but I'm curious as to why
> others reckon that PHP sucks.....
It doesn't. However, many average joes who find PHP accessible and
therefore usable, do suck rocks.
EP
From | Date | Subject | |
---|---|---|---|
Next Message | Erick Papadakis | 2007-06-16 21:39:32 | Re: PHP sucks!! - was: persistent db connections in PHP |
Previous Message | Ron Johnson | 2007-06-16 20:57:16 | Re: PHP sucks!! - was: persistent db connections in PHP |