2 ms·
I've been fooling around on code-golf.io, and PHP is the only language where it feels like I'm fighting with the interpreter every time I refactor. Swap array_
by labster 9y ago
I've been fooling around on code-golf.io, and PHP is the only language where it feels like I'm fighting with the interpreter every time I refactor. Swap array_filter for array_map? Gotta switch the order of the arguments. They also have a barely-documented, binary version of the ternary operator[0], which is certainly a unique idea.
Lua doesn't give you much, but it stays out of your way. Perl has batteries included. Perl 6 does too, but also asks if you'd like more batteries. Python looks sane. But PHP is one little edge case after another.
[0]: https://secure.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary https://secure.php.net/manual/en/language.operators.comparis...