Search Postgresql Archives

Re: PHP sucks!! - was: persistent db connections in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/17/07, Raymond O'Donnell <rod@xxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux