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).
There was an RFC for that, but it was voted out: https://github.com/php/php-src/pull/2049
str_starts_with() and str_ends_with() are coming in PHP 8.0.
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.)