Re: PHP sucks!! - was: persistent db connections in PHP - Mailing list pgsql-general

From Erick Papadakis
Subject Re: PHP sucks!! - was: persistent db connections in PHP
Date
Msg-id e9e8f77d0706161434i3547988fwab523ab6b6cdd48c@mail.gmail.com
Whole thread Raw
In response to PHP sucks!! - was: persistent db connections in PHP  (Raymond O'Donnell <rod@iol.ie>)
Responses Re: PHP sucks!! - was: persistent db connections in PHP  ("Leif B. Kristensen" <leif@solumslekt.org>)
List pgsql-general
On 6/17/07, Raymond O'Donnell <rod@iol.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

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: PHP sucks!! - was: persistent db connections in PHP
Next
From: "Erick Papadakis"
Date:
Subject: Re: PHP sucks!! - was: persistent db connections in PHP