Re: I couldn't understand why PHP is so popular. The PHP code looks so horrible compared with Java.



On 29 Apr, 13:02, ZeldorBlat <zeldorb...@xxxxxxxxx> wrote:
On Apr 29, 2:00 am, tenxian <hi.steven...@xxxxxxxxx> 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;}

?>

Wow, I never realised you could do Hello World without instantiating a
custom class.
.



Relevant Pages

  • MyBulletinBoard (MyBB) <= 1.2.3 Remote Code Execution Exploit
    ... PHP conditions: none ... # Calculation of the server response time which returns TRUE ... # End of the string? ... # The tested char returns TRUE ...
    (Bugtraq)
  • Re: How to use COM in php?
    ... > Declaring a char array as a class member variable allocates storage ... Whether it's a class member or not has ... You could not return a pointer or reference to an automatic std::string, ... container classes make C++ much more like PHP than if you use C-style ...
    (comp.lang.php)
  • [SLE] Installing new PHP (or GD) on SuSE 8.1
    ... I'm trying to compile a new php version for my SuSE 8.1 server. ... /* We use char because int might match the return type of a gcc2 ... In fact I only want a new php, because I need a current version of GD ...
    (SuSE)
  • sigh back again... php encryption...
    ... I am trying to learn how to send data from a webpage written in php ... $char = chr+ord); ... echo $result; ... This does not need to be the mona lisa, aka DES or 256 bit encryption ...
    (sci.crypt)
  • Re: n00b help
    ... float and char, so i havent used them, i dont want to get confused early on, ... even though i have programmed before with vb and used php i think c++ is ... int iFirst, iSecond, iAnswer; ... correct operator, I was told this was quite ambitious for my first program ...
    (comp.lang.cpp)