Re: I couldn't understand why PHP is so popular. The PHP code looksso horrible compared with Java.
On Apr 29, 2:00 am, tenxian <hi.steven...@gmail.com> wrote:
> Could you put up with the horrible PHP code?
I completely agree. I mean, it's ridiculous that you need all this
code just for a simple "hello world" program:
<?php
$arrData = array(72,101,108,108,111,32,87,111,114,108,100,33) ;
for($i = 0; $i < count($arrData); $i++) {
$char = $arrData[$i];
$char = fConvertChar($char);
print $char;
}
function fConvertChar($char) {
$char = 72 + 2 * $char / 4 * 2 - (8.32 * 8.65384);
$char = chr($char);
return $char;
}
?>
|