shl...@cec68495-dca5-4e2b-845c-11fdaaa4f967  committed 30c15db

r6203@telaviv1: shlomi | 2008-11-17 20:06:47 +0200
Added the "PHP Sucks" Page.

  • Participants
  • Parent commits 86da6e6
  • Branches default

Comments (0)

Files changed (2)

File t2/open-source/anti/index.html.wml

 <h3><a href="$(ROOT)/no-ie/">Stop Using Internet Explorer!</a></h3>
-<h3><a href="./qmail/">Stop Using the qmail SMTP Server</a></h3>
+<h3><a href="qmail/">Stop Using the qmail SMTP Server</a></h3>
-<h3><a href="./csh/">Stop Using (and Teaching) the C-Shell</a></h3>
+<h3><a href="csh/">Stop Using (and Teaching) the C-Shell</a></h3>
-<h3><a href="./apple/">Against Apple Inc.</a></h3>
+<h3><a href="apple/">Against Apple Inc.</a></h3>
-<h3><a href="./windows-vista/">Against Windows Vista</a></h3>
+<h3><a href="windows-vista/">Against Windows Vista</a></h3>
-<h3><a href="./mysql/">Against MySQL</a></h3>
+<h3><a href="mysql/">Against MySQL</a></h3>
+<h3><a href="php/">"PHP Sucks" - originally by</a></h3>
 <h2>Links to other Anti-Stuff</h2>
 Programming Considered Harmful</a> by Tom Christiansen of Perl fame.
-<a href="">PHP Sucks by czth</a>
 <a href="">The Freshmeat Editorial 
 "What is Wrong with Make?"</a> by Adrian Neagu and its sequel
 <a href="">Make Alternatives</a>.

File t2/open-source/anti/php/index.html.wml

+#include '../template.wml'
+<latemp_subject "PHP Sucks (originally by czth)" />
+<h2 id="note">Note</h2>
+This is a copy of a page that went offline from I'll add links to
+it below.
+<p> <a href="">PHP</a> Sucks. 
+<i>"PHP is an abomination." - David Robins, December 17, 2002.</i> </p> 
+    <li> <a href="">PHP annoyances</a> </li> 
+    <li> <a href="">Some comments from use Perl;</a> </li> 
+    <li> <a href="">Experiences of Using PHP in Large Websites</a> </li>
+    <li> <a href="">Nathan Torkington's list of PHP's shortcomings</a> </li>
+    <li> <a href="">GNU-Friends article by lupo</a> </li>
+    <li> <a href="">PHP in contrast to perl</a> systematically points out PHP inconsistencies </li> 
+    <li> <a href="">Joel on Software</a> mentions PHP's willful ignorance of character encodings[1] </li> 
+    <li> The <a href="">PHP::Strings</a> perl module will provide much enlightenment </li> 
+<p> [1] character encodings are a pain in the neck, but they <i>are</i> necessary </p> 
+<p> Some points of my own: </p>
+<p> Of course you can write complex scripts in PHP - it's Turing complete. It's just painful. (See Paul Graham's <a href="">Succinctness is Power</a>
+article.) You can write complex scripts in assembler; it's also
+painful. But assembler has a niche, a place where it shines: when you
+need to hand-optimize something or write low-level code (think kernels,
+trampolines, compiler magic). PHP doesn't. There's nothing for which it
+is the best choice. </p> 
+<p> A simple problem and a perl solution: remove all matches to <tt>id=<i>some integer value</i></tt> (at the end of a string) from a list, also stripping off <tt>id=<i>value</i></tt> from the other strings. (Admittedly this seems a little contrived but it was actually needed by somebody at some point.) </p> 
+<pre>@array = grep { s/id=(\d+)$// ? $1 != $value : 1 } @array;</pre> 
+<p> [2005-02-04] Finally there's a PHP equivalent from Jason Sweat, after almost 2 years: </p> 
+<pre>$array = array_filter($array, create_function('$v','return !preg_match(\'/id=\d+$|id='.$value.'$/\',$v);'));</pre> 
+<p> At least it's possible, but note the following two things: it has to parse code at runtime (think <tt>eval STRING</tt>),
+and that it makes use of perl regular expression matching (beats
+reinventing the wheel I guess). It just doesn't have the elegance of
+the perl (IMO). </p>