PDA

View Full Version : Test PHP



Chukamuk
29 Apr 2005, 04:37 PM
Test of the php tag.


$x = 0;
$a = 1;
$b = 1;
$sum = 0;

for( $x=1; $x<41; $x++ )
{
$sum = $a + $b;
$a = $b;
$b = $sum;

print( "(" . $x . ") " . ($b / $a) );
print( "<br>" );
}

Chukamuk
29 Apr 2005, 04:39 PM
So, it's just a syntax hilighter.

It doesn't actually execute php scripts.

Bummer.

Chukamuk
29 Apr 2005, 04:41 PM
<?php
$x = 0;
$a = 1;
$b = 1;
$sum = 0;

for( $x=1; $x<41; $x++ )
{
$sum = $a + $b;
$a = $b;
$b = $sum;

print( "(" . $x . ") " . $sum . " " . ($b / $a) );
print( "<br>" );
}
?>

Chukamuk
29 Apr 2005, 04:42 PM
Nope that didn't work either. Experiment concluded.

YardGnome
29 Apr 2005, 04:43 PM
Heh, nope... still doesn't work

Chukamuk
29 Apr 2005, 04:45 PM
Just for shits and giggles, do you know what its calculating?

SheepDog
29 Apr 2005, 04:56 PM
golden ratio.

Chukamuk
29 Apr 2005, 05:06 PM
golden ratio.
What does he win Johnie???
A new car!!!:thumbup:

Shadow
30 Apr 2005, 02:29 AM
Unless you intended your code to be executed in a chrooted process, it would be an extreme security risk to allow such in the first place.