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

Поиск
Список
Период
Сортировка
От Erick Papadakis
Тема Re: PHP sucks!! - was: persistent db connections in PHP
Дата
Msg-id e9e8f77d0706161434i3547988fwab523ab6b6cdd48c@mail.gmail.com
обсуждение исходный текст
Ответ на PHP sucks!! - was: persistent db connections in PHP  (Raymond O'Donnell <rod@iol.ie>)
Ответы Re: PHP sucks!! - was: persistent db connections in PHP  ("Leif B. Kristensen" <leif@solumslekt.org>)
Список 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 по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: PHP sucks!! - was: persistent db connections in PHP
Следующее
От: "Erick Papadakis"
Дата:
Сообщение: Re: PHP sucks!! - was: persistent db connections in PHP