2008.01.17 12:54 zagadka w PHP / PHP puzzle

What will be the output of this program?:
$x = 10;
$y = 20;
($x = 0) and ($y = 1);
print("x=$x y=$y");
And this one?:
$x = 10;
$y = 20;
($x = 1) and ($y = 0);
print("x=$x y=$y");


komentarze:
2008.01.17 13:57 mg

x=0 y=20
x=1 y=0

chyba, ze php jest gupie ;)


2008.01.17 14:04 Piotrek

Dobrze.


2008.01.17 14:24 mg

http://en.wikipedia.org/wiki/Short-circuit_evaluation



ksywa:

tu wpisz cyfrę cztery: (to takie zabezpieczenie antyspamowe)

komentarze wulgarne albo co mi się nie spodobają będę kasował


powrot na strone glowna

RSS