Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

i think PHP has the opposite problem of JavaScript - a build-in function library that's too big and very inconsistent. much of http://phpsadness.com/ remains in v7+. i tried to get them to change their long-standing, self-admitted improper ternary associativity [1] or at least deprecate it in v7 but it resulted in a huge bikeshed (despite no one actually encountering code that depended on the wrong behavior which has been discouraged for many years) and died a fast death [2]. their "if it's documented [3], it ain't broken" stance is pretty toxic and they maintain BC to a fault, IMO.

also, they've refused to implement native multi-part formdata parsing in anything other than POST requests and dont expose a good/safe way to get this done either, leaving PUT/PATCH request parsing up to the users, which is shitty and has been asked for a long time ago [4]. this means you can't rely on language-level support for basic REST, leaving it up to frameworks/routers.

it's crap like this that moved me on to other languages. PHP7 is fast though, and gets shit done. i'll give it that. i don't see any reason to start a new project with it when you can have node/js/vscode (or better).

[1] http://phpsadness.com/sad/30

[2] http://grokbase.com/t/php/php-internals/14cdp789nk/fix-incor...

[3] http://php.net/manual/en/language.operators.comparison.php#l...

[4] https://bugs.php.net/bug.php?id=55815



> i tried to get them to change their long-standing, self-admitted improper ternary associativity [1] or at least deprecate it in v7 but it resulted in a huge bikeshed

Oh man. Remember that drama in the internals when trying to remove T_PAAMAYIM_NEKUDOTAYIM ?


For those that (like me) hadn't heard of it: https://philsturgeon.uk/php/2013/09/09/t-paamayim-nekudotayi...


Thanks for that link, that was a hilarious read. Highly recommended.


the fact that you had to google it is delightfully fitting.


don't remind me.


good times.


At least their reluctance to implement your feature requests for native formdata parsing seems to address your criticism that the built-in function library is too big.


they don't need to be functions. PUT/PATCH/etc bodies should be decoded automatically into new superglobals to match the existing $_GET, $_POST and $_FILES. if you're gonna have a shitty API, at least have a uniform shitty API ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: