NYCPHP Meetup

NYPHP.org

[nycphp-talk] Why do "cool kids" choose PHP to build websites instead of Java

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Jan 2 18:09:26 EST 2008


Jake McGraw wrote:
> Tim:
> 
> You're not to fault, and the point about Java collections Vs array() is 
> pretty good, unfortunately, I never made it that far because I was 
> completely turned off by the "article", the exact text Tim was referring 
> to:
> 
> James Anderson wrote: The really simple answer is that after the release 
> of php 5, php became the better language. 

Oh really? From http://zestyping.livejournal.com/124503.html


% cat equality.php
<?php

$a = 0;
$b = "eggs";
$c = "spam";

print ($a == $b) ? "a == b\n" : "a != b\n";
print ($b == $c) ? "b == c\n" : "b != c\n";
print ($a == $c) ? "a == c\n" : "a != c\n";
print ($a == $d) ? "a == d\n" : "a != d\n";
print ($b == $d) ? "b == d\n" : "b != d\n";
print ($c == $d) ? "c == d\n" : "c != d\n";

?>

% php equality.php
a == b
b != c
a == c
a == d
b != d
c != d

(Of course, starting in version 5, Java began to mess up simple 
Aristotelian logic too, but not quite this badly.)


-- 
Elliotte Rusty Harold  elharo at metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/



More information about the talk mailing list