Linked by Thom Holwerda on Sun 30th Sep 2012 20:15 UTC, submitted by MOS6510
General Development "The ObjectScript is a new programing language that mixes benefits of JavaScript, Lua, and PHP. The ObjectScript has syntax from JavaScript, multiple results from Lua, OOP from PHP and much more."
Permalink for comment 537136
To read all comments associated with this story, please click here.
RE[2]: Comment by YEPHENAS
by Alfman on Mon 1st Oct 2012 08:29 UTC in reply to "RE: Comment by YEPHENAS"
Alfman
Member since:
2011-01-28

dikatlon,

"Why is PHP so evil?"

s/evil/bad/

Well, having been a regular user since the beginning, I can say without a doubt PHP is superior in all ways to what it largely replaced: ASP. However that's where my praise ends. The language has suffered from inconsistency and poor SE decision making over the course of it's entire history such that the developer qualifications behind PHP are brought into question. PHP has a history of semantic flip flops creating code incompatibilities.

Ignoring the multitude of teething problems which PHP has been notorious for in the past. Here are current gripes that are often cited (in no particular order):

1. Namespace mess. This is all all the evidence one needs to officially declare the developers as certified amateurs. Also every programmer has their own opinions about whether function names should be camel case, abbreviated, underlined, etc, but at least we agree to pick one convention and stick to it. PHP is the only language I know of where standard functions have completely disregarded any kind of standard naming convention. One has to wonder whether they had any future direction at all.


2. Thread safety risks inhibit web hosts from being able to deploy multi-threaded versions of apache.

http://neosmart.net/blog/2008/dont-believe-the-lies-php-isnt-thread...
(I'd appreciate any information about whether they've finally fixed it, but it was still crashing in 2010/11)


3. Unicode.
I'm often called up by clients who find unicode glitches on a website caused by php bugs in handing unicode characters which may have been posted into the database, etc. I replace unicode characters with html equivalents, but unicode should just work these days.


4. Magic quotes.
Stupid, stupid, stupid, stupid...


5. Lack of session concurrency.
I uncovered this this year when I was trying to use concurrent ajax calls to monitor a long running process. One visitor can only have one running script per session. Apache will pass a predefined number of concurrent connections to PHP, but PHP will block them and run them serially. So, the long running process would block all further PHP pages for this visitor until the long running process was complete. This entirely defeated my intended purpose of employing concurrent ajax calls. I ended up writing a C daemon to work around the limitation.

6. Comparison operators
PHP diverges from other dynamically typed languages to use this proprietary syntax.

if (F(x)) {...}
vs
if (F(x)==true) {...}
vs
if (F(x)===true) {...}

PHP's equality personality disorder is a source of bugs and confusion. To make matters worse, we've got expressions like "x>==0".


7. PHP's documentation
Well, PHP documentation is a big plus. I thought it was superb, or so I did before php.net recently injected google search results ahead of it's own function search listings. Why did they do that?? Now I have to scroll through a screen full of irrelevant google listings before I can click on the php.net links I want.

Reply Parent Score: 5