News for hackers. Stuff that matters.
Re:25 Years of PHP by ComputerGuru on Wednesday June 10, 2020 @10:08AM (#23477136)
> It has a very rich standard library

Yet I still have to define startsWith() and endsWith() any time I touch PHP code...

(More importantly, PHP is the one language I can never write from memory without referencing the manual for each and every function call because of how inconsistent it is. Eg Sometimes $haystack is the first parameter and sometimes it is $needle.)

Re:25 Years of PHP by potta_coffee on Wednesday June 10, 2020 @02:02PM (#23480113)
This is my problem with PHP. Python for instance has it's own issues, but after coding in Python for awhile I can just guess the interface of various methods etc and be correct almost all of the time. PHP in comparison is so egregiously inconsistent that I have to reference documentation constantly. Python, Go and even Javascript are light years beyond PHP quality-wise (I'm comparing to those 3 languages because they're the ones I use daily right now).
Re:25 Years of PHP by SergeAx on Wednesday June 10, 2020 @10:22AM (#23477289)
There was an RFC for that, but it was voted out: https://github.com/php/php-src/pull/2049
Re:25 Years of PHP by AegirLeet on Wednesday June 10, 2020 @10:51AM (#23477612)
str_starts_with() and str_ends_with() are coming in PHP 8.0.
Re:25 Years of PHP by JAlexoid on Wednesday June 10, 2020 @01:47PM (#23479932)
That would be str_starts_with() and strendswith(). &$ing up functions names is a feature of PHP.