News for hackers. Stuff that matters.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by leeoniya on Saturday July 29, 2017 @11:54PM (#14884374)
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

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by vatotemking on Sunday July 30, 2017 @02:55AM (#14884763)
> 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 ?

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by detaro on Sunday July 30, 2017 @03:05AM (#14884794)
For those that (like me) hadn't heard of it: https://philsturgeon.uk/php/2013/09/09/t-paamayim-nekudotayi...
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by kalleboo on Sunday July 30, 2017 @04:54AM (#14885070)
Thanks for that link, that was a hilarious read. Highly recommended.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by leeoniya on Sunday July 30, 2017 @03:17AM (#14884831)
the fact that you had to google it is delightfully fitting.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by leeoniya on Sunday July 30, 2017 @03:10AM (#14884807)
don't remind me.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by vatotemking on Sunday July 30, 2017 @03:25AM (#14884856)
good times.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by raarts on Sunday July 30, 2017 @01:29AM (#14884559)
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.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by leeoniya on Sunday July 30, 2017 @01:39AM (#14884586)
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 ;)