For instance they've built a perfectly good object system with many advanced features; yet arrays, strings, etc aren't objects so you can't even call methods on them, they can only be manipulated by a dated, procedural API.
For instance they've built a perfectly good object system with many advanced features; yet arrays, strings, etc aren't objects so you can't even call methods on them, they can only be manipulated by a dated, procedural API.
Everybody learned the wrong lesson from the Python 3 debacle. The lesson everybody learned was "Big language changes are bad, don't do them". Whereas the lesson everybody should have learned was "Writing code in a dynamically typed language is like writing it in stone, it's really expensive to upgrade it later".
https://github.com/nikic/scalar_objects
However scalar methods also creates a bigger discussion around the existing standard library, should functions be duplicated? Etc.
Better in my opinion, because the standard library is mostly functions in the global namespace is to add pipe operator, it has been voted on but not passed yet due to some limitation.
Pipe operator is more flexible because you can use your own functions when chaining.
And then of course there are libraries that does this, which is similar to how Java does it, compare float vs Float.
Array manipulation and associative arrays in PHP are some of its strong points. Yes they are easy to abuse but they are also extremely flexible and make development fast.
However nowadays nobody uses PHP as a procedural language, they use it as an object-oriented language. In that context it is extremely strange to have this procedural API still hanging around for "old" types.