Page 1 of 1

You know you've done too much PHP when...

Posted: Wed May 09, 2007 12:30 pm
by impulse()

Posted: Wed May 09, 2007 12:42 pm
by RobertGonzalez
Very cute.

Posted: Wed May 09, 2007 1:51 pm
by php3ch0
lol

I like

Posted: Wed May 09, 2007 2:07 pm
by Oren
Nice! :lol:

Posted: Wed May 09, 2007 3:41 pm
by infolock

Code: Select all

class killnoob implements ChineseKungfu{
  function __CONSTRUCT(){
    global $noob;
    die($noob);
    //SUCCESS on killing all the noobs in the world.
  }
}

Posted: Wed May 09, 2007 6:29 pm
by toasty2
Why does 2^2 = 0 in php?

Posted: Wed May 09, 2007 6:46 pm
by Oren
'^' is XOR.

Truth table for XOR:

Code: Select all

0 ^ 0 | 0
0 ^ 1 | 1
1 ^ 0 | 1
1 ^ 1 | 0
When PHP sees the "2 ^ 2" it interprets it like: 10 ^ 10 (2 in dec = 10 in binary)
And it does the arithmetic XOR operation bit by bit:

Code: Select all

10
XOR
	10
=============
	00

Posted: Wed May 09, 2007 6:55 pm
by toasty2
Well I've never had to do anything but addition, subtraction, multiplication, and division in php, so I didn't know that.

Posted: Thu May 10, 2007 3:41 am
by ptrpan
hahahaha. Couldnt be more true :lol: