Hacker News new | ask | show | jobs
by ts-jondin 4167 days ago
Inconsistency, would be my topmost argument, in general. Among many other things these include what PHP dodges under the term "language construct" which when searched produces a wikipedia stub article with the only examples in PHP.

Failed closures that lack proper scoping, while they have been improved the underlying problem remains.

Continuation on inconsistency is that functions are not first class even though the syntax is the same for closures:

function foo () { } <--- This is a function

$foo = function () { } <--- This is a closure

Inconsistency; Cannot access functions (closures) directly from arrays.

$list["something"] = function () { };

$list["something"]() <- fatal error

What is "truthy" and what is "falsy", not unique to PHP but that doesn't mean PHP should do it.

Assumptions such as how it interprets numbers in octal

Functions do not follow any specific naming standard, i.e. some array functions are prefixed by array_*, some are not.

Include and require scoping is messed up as anything that is not a variable is mashed into the global scope.

Lastly in my post but far from all issues with PHP; A crap-load of legacy because "we can never break anything"