Why PHP sucks.

  • No lambda functions/subroutines.
  • == vs. ===
  • 5 bazillion functions imported by default in top level Namespace
  • The lanugage comunity is esentialy the VB6/JavaScript community -- Well at least JavaScript has clean semantics.

In other words php is not the market we want to go after.
I'm just saying that php is not a good model to base a language off of, except for ease of configuration.

3 Comments

Okay, I'll bite.

  1. Most code isn't taint safe anyway, including large swathes of the cpan. Ergo, noone cares.
  2. I think what you're trying to say is "PHP doesn't have references", it's "reference to" operator actually binds an alias in the symbol table
  3. As of php 5.3 you're wrong
  4. Just use === all the time and stop caring?
  5. SPL is attempting to fix this problem by providing a set of classes to wrap the common operations. It's also largely implemented in PECL (XS equivalent).
  6. I beg to differ. Some parts of the PHP community are rather good. Several of my good Perly friends also contribute in the PHP community

If you're going to flame, at least get your facts right.

No love,
James (who much prefers Perl)

PHP 5.3+ supports lambda/anon functions.

As of ease of configuration, I disagree. Sometimes it's hard for different PHP apps to use different php.ini (well it depends on the type of server configuration), and php.ini is still required because not all configuration can be set by ini_set().

Plus you still have to undo magic_quotes to avoid hairpulling. Plus turn off register_globals if by default still on. And others.

I find Perl CGI's easier to configure, with local::lib and all.

Leave a comment

About George Rogers

user-pic JAPH.