Page 1 of 1

Need help with part of PHP code!

Posted: Thu Dec 23, 2010 3:48 am
by Malyghos
Hello,
I have one line that I can't understand of PHP code used to encrypt strings:

Code: Select all

$temp = ord(substr($str,$i,1)) ^ 203;
I understand everything but this " ^203 "
Can you explain me what it does?

Re: Need help with part of PHP code!

Posted: Thu Dec 23, 2010 6:55 am
by cpetercarter
^ is the bitwise XOR operator. In your example $temp will be a value in which bits are set IF they are set in the expression ord(substr($str,$i,1)) OR in the integer 203 BUT NOT in both.