E.g. XMLHttpRequest vs ExtensibleMarkupLanguageHypertextTransferProtocolRequest
and ftp_ssl_connect vs FileTransferProtocol_SecureSocketLayer_Connect
or if you want to get really ridiculous:
MysqlndUhConnection::sslSet becomes MyStructuredQueryLanguageNativeDriverUserHandlerConnection::SecureSocketLayerSet
Not being very familiar with PHP, I don't have any pet examples of inconsistent names to offer corrections for that might correspond with what he's actually talking about.
Fortunately, by the Pentium era, which was when PHP was designed, those times were long gone.
"X made this design decision before us" is never a good justification for any design decision unless the decision is truly arbitrary (i.e., are arrays 0 or 1 indexed?) -- then it might be better to stick to what's more familiar. If it was a good design decision then, then there must have been some reason at the time that should be true now to give a good case for repeating a design decision.
read this:
http://philsturgeon.co.uk/blog/2013/09/t-paamayim-nekudotayi...
e.g.
function findFirst ($haystack, $needle, $before_needle=false, case_sensitive=false) {
if (case_sensitive) {
return stristr($haystack, $needle, $before_needle);
}
return strstr($haystack, $needle, $before_needle);
}
You can submit them as RFC to https://wiki.php.net/rfc and maybe your suggestion end up in a future version of PHP. As PHP code in HHVM is almost as fast as C++ code, your wrapper functions will be still useful for you in the meantime.The problem is speed and compatibility. If you did it natively you'd have to do it twice, once for HHVM and once for the Zend engine. If you did it in pure PHP it would cause performance issues since the interpreter isn't smart enough to inline (maybe HHVM is, but even it will take a trace or two to realize the JIT need probably).
$foo = 'bar';
echo $foo->length(); // 3
echo strlen($foo); // 3
This would get rid of a lot of the confusion around string function names.Basically, if you use PHP you're part of the largest computer joke in history.
I have no problem with using either PHP or Python on a particular project, depending on what is involved. I wish PHP threads would show a bit more maturity/pragmatism on both sides of the aisle sometimes.
http://yougov.github.io/pycon/slides/
http://highscalability.com/blog/2012/3/26/7-years-of-youtube...
http://www.slideshare.net/jinaljhaveri/scaling-python-webapp...
http://blog.disqus.com/post/62187806135/scaling-django-to-8-...