== and ===

From: Date: Mon, 18 Apr 2005 18:46:01 +0000
Subject: == and ===
Groups: php.internals 
Request: Send a blank email to internals+get-16016@lists.php.net to get a copy of this message
Just came across this: http://bugs.php.net/bug.php?id=23110 I've been programming PHP since PHP 3 and wasn't even aware of this behavior. "Numeric strings"? What is that? if ($typedPassword == $password) doSomeAdministrativeTaskHere(); You better not use '000000001' as password, or '0e00.0000', since people would be able to use '' (yes, empty string!) to hack your app. -- Hendy Irawan http://www.gauldong.net http://dev.gauldong.net

« previous php.internals (#16016) next »