It took me 2 solid hours to figure out why two visually identical strings would produce totally difference checksums. After examining the byte output of mcrypt_decrypt, I found there are tons of trailing nulls behind the decrypted string. The reason why I could not visually differentiate between a string with trailing nulls ($A) and the [...]

17
Mar

One of the most common problems encountered by novice PHP users is that cookies do not seem to persistent across subdomains using a normal approach found in many website examples. The solution is simple. The full argument of PHP’s setcookie function is as follow: bool setcookie ( string $name [, string $value [, int $expire [...]