Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.
Moderator: General Moderators
impulse()
Forum Regular
Posts: 748 Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:
Post
by impulse() » Wed May 09, 2007 12:30 pm
php3ch0
Forum Contributor
Posts: 212 Joined: Sun Nov 13, 2005 7:35 am
Location: Folkestone, Kent, UK
Post
by php3ch0 » Wed May 09, 2007 1:51 pm
lol
I like
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Wed May 09, 2007 2:07 pm
Nice!
infolock
DevNet Resident
Posts: 1708 Joined: Wed Sep 25, 2002 7:47 pm
Post
by infolock » Wed May 09, 2007 3:41 pm
Code: Select all
class killnoob implements ChineseKungfu{
function __CONSTRUCT(){
global $noob;
die($noob);
//SUCCESS on killing all the noobs in the world.
}
}
toasty2
Forum Contributor
Posts: 361 Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA
Post
by toasty2 » Wed May 09, 2007 6:29 pm
Why does 2^2 = 0 in php?
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Wed May 09, 2007 6:46 pm
'^' 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:
toasty2
Forum Contributor
Posts: 361 Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA
Post
by toasty2 » Wed May 09, 2007 6:55 pm
Well I've never had to do anything but addition, subtraction, multiplication, and division in php, so I didn't know that.
ptrpan
Forum Commoner
Posts: 81 Joined: Tue Apr 03, 2007 5:09 am
Location: Cape Town, South Africa
Post
by ptrpan » Thu May 10, 2007 3:41 am
hahahaha. Couldnt be more true