Skip to main content
gamedev.net
🔒 Locked

PHP disadvantages

Started by TheSorcerer 5 replies 4.7k views
Original Post
TheSorcerer
TheSorcerer
Are there any??? I''m asking this for a report I''m making. I have alot of advantages, but I can''t think of any disadvantages. I''ve been using PHP for a while now, so I have experience with PHP. Can anyone think of any? Sorcerer


SorcSoft.com -> Homepage | Pictures | FTP Upload | Contact
Origin
Origin
1. It encourages messy coding.

2. It suffers from a poor original design so that the language specification changes with almost every new release.

3. OOP support is still lacking in many ways.

4. It does not encourage modular programming in any way.

5. Sometimes, it supports too many ways to do the same things.

6. The naming conventions for functions and variables are not always consistent.

But hey, after all, it''s a scripting language. And it''s free!
SHilbert
SHilbert
Well, there are a few I can think of:

1) Not as optimized as something precompiled. Each PHP object has a bit of overhead, and the script has to be parsed each time it''s run -- unless you''re using that Zend optimizer thingy or a cache. This means it might use quite a bit more memory/CPU time in intensive situations compared to CGI programs written in lower-level languages.

2) No language-level regex support or pronoun identifiers. (Probably only people from Perl would miss this)

3) Lower-level DB access (mysql_* type functions) aren''t unified regardless of the DB type. PEAR''s DB module takes care of that rather well though.

4) If it''s used as a module you might end up with some difficulties getting scripts to run as different users. However, this is really common with almost any alternative. (If you run anything a CGI binary you lose a lot of speed.)

5) Something inherited from C -- the language is so flexible that it''s possible to create thousands of different coding styles, unlike more "rigid" languages like Python. (Of course, Python has its own weird points, but that''s sort of off-topic.) The actual problem with this is when you try to use code from a different source and it''s organized totally differently than your original code.

I hope that helps a little.
SHilbert
SHilbert
Bleh, I can''t believe I forgot OOP support
DaTroof
DaTroof
My biggest complaint about OOP in PHP is the lack of support for private class members.

Supposedly, this feature is forthcoming. I just hope it doesn''t break the language design too severely.
Post Extant Graphical MUD

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.