Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'll do <strong>PHP</strong> as I like it at times and Python will be done way too much.</p> <ul> <li><p>No namespace; everything is in a kind of very big namespace which is hell in bigger environments</p></li> <li><p>Lack of standards when it comes to functions: array functions take a needle as a first argument, haystack as second (see <a href="http://ca3.php.net/manual/en/function.array-search.php" rel="nofollow noreferrer">array_search</a>). String functions often take the haystack first, needle second (see <a href="http://ca3.php.net/manual/en/function.strpos.php" rel="nofollow noreferrer">strpos</a>). Other functions just use different naming schemes: <a href="http://ca3.php.net/manual/en/function.bin2hex.php" rel="nofollow noreferrer">bin2hex</a>, <a href="http://ca3.php.net/manual/en/function.strtolower.php" rel="nofollow noreferrer">strtolower</a>, <a href="http://ca3.php.net/manual/en/function.cal-to-jd.php" rel="nofollow noreferrer">cal_to_jd</a> </p> <p>Some functions have weird return values, out of what is normal: This forces you to have a third variable declared out of nowhere while PHP could efficiently interpret an empty array as false with its type juggling. There are near no other functions doing the same.</p> <pre><code>$var = preg_match_all('/regexp/', $str, $ret); echo $var; //outputs the number of matches print_r($ret); //outputs the matches as an array </code></pre></li> <li><p>The language (until PHP6) does its best to respect a near-retarded backward compatibility, making it carry bad practices and functions around when not needed (see <a href="http://ca3.php.net/manual/en/function.mysql-escape-string.php" rel="nofollow noreferrer">mysql_escape_string</a> vs. <a href="http://ca3.php.net/manual/en/function.mysql-real-escape-string.php" rel="nofollow noreferrer">mysql_real_escape_string</a>).</p></li> <li><p>The language evolved from a templating language to a full-backend one. This means anybody can output anything when they want, and it gets abused. You end up with template engines for a templating language...</p></li> <li><p>It sucks at importing files. You have 4 different ways to do it (include, include_once, require, require_once), they are all slow, very slow. In fact the whole language is slow. At least, pretty slower than python (even with a framework) and RoR from what I gather.</p></li> </ul> <p>I still like PHP, though. It's the chainsaw of web development: you want a small to medium site done real fast and be sure anybody can host it (although configurations may differ)? PHP is right there, and it's so ubiquitous it takes only 5 minutes to install a full LAMP or WAMP stack. Well, I'm going back to working with Python now...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload