The most annoying thing you encouter daily in PHP is the needle/haystack problem. There is no consistency with parameters of the standard library. It could be fixed in two ways:
a) Make everything an object, where methods can be called on:
$arr = [];
$arr->key_exists('key');
b) Create a new class-based standard library, where you call those functions statically and needle/haystack are always in the same place:
Arr::key_exists($arr, 'key');
Either way, you can deprecated all the array_..., str_..., etc. functions and end the guessing game. Other than that PHP is turning out great.
a) Make everything an object, where methods can be called on:
b) Create a new class-based standard library, where you call those functions statically and needle/haystack are always in the same place: Either way, you can deprecated all the array_..., str_..., etc. functions and end the guessing game. Other than that PHP is turning out great.