Great summary. I still use PHP. In fact, our API is running on PHP Slim 3 framework. PSR, Autoloading, Composer - all great improvements to the PHP community. My biggest complaint historically has been inconsistent argument order across similar methods, Strings in particular.
I also love that PHP is open-ended. There's more than one way to skin a cat.
I like that I can run PHP on any web server of my choosing - let's say Apache running on Event MPM, or nginx.
Right, inconsistency has been a major issue with PHP and it needs to be addressed. It sometimes gets annoying.
But again, remembering every argument order would be hard in any language. The manual or a nice IDE/Text editor should make up for it. PHPStorm does a really good job.
need and haystack are used for search functions. The very thinking in 'array' or 'string' functions as PHP has it is just proof of the madness baked in the language. We are talking search functions that happen to apply to arrays or strings. If there's a good reason for them to be that way, I'd love to hear it.
Great summary. I still use PHP. In fact, our API is running on PHP Slim 3 framework. PSR, Autoloading, Composer - all great improvements to the PHP community. My biggest complaint historically has been inconsistent argument order across similar methods, Strings in particular.
I also love that PHP is open-ended. There's more than one way to skin a cat.
I like that I can run PHP on any web server of my choosing - let's say Apache running on Event MPM, or nginx.
Right, inconsistency has been a major issue with PHP and it needs to be addressed. It sometimes gets annoying.
But again, remembering every argument order would be hard in any language. The manual or a nice IDE/Text editor should make up for it. PHPStorm does a really good job.
The oft-cited issue of $needle & $haystack order is moot. It's one way for array functions & one way for string functions. != inconsistent.
need and haystack are used for search functions. The very thinking in 'array' or 'string' functions as PHP has it is just proof of the madness baked in the language. We are talking search functions that happen to apply to arrays or strings. If there's a good reason for them to be that way, I'd love to hear it.
So you're saying the functions should overload their purpose & accept both string or array haystacks?