Hacker News new | ask | show | jobs
PHP 8 Released (php.net)
4 points by mnazim 2036 days ago
1 comments

Having not used PHP for many years, this does look like a nice set of improvements.

Are there any plans to improve the standard library? For example, looking at the first example from this changelist:

  htmlspecialchars($string, double_encode: false); 
Wouldn't this be nicer encapsulated as something like:

  $encoded = $myString.htmlEncode(double_encode: false);
or

  $encoded = String.htmlEncoded($myString, double_encode: false);
I think that's more discoverable/logical than just a strangely named function in the global scope.