Edit report at https://bugs.php.net/bug.php?id=61561&edit=1
ID: 61561 Updated by: yohg...@php.net Reported by: sokkis at gmail dot com Summary: 0=='0000-00-00' is true -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: Gentoo PHP Version: 5.3.10 Block user comment: N Private report: N New Comment: use === It's a type juggling. http://jp.php.net/manual/en/language.types.type-juggling.php Previous Comments: ------------------------------------------------------------------------ [2012-03-30 10:00:36] sokkis at gmail dot com I wrote some mistake. '0000-00-00' is equal with 0. I think is false, because i have two "-" in the string. ------------------------------------------------------------------------ [2012-03-30 09:58:39] sokkis at gmail dot com Description: ------------ '0000-00-00' is equal with '000-00-00'. I think is false, because i have two "-" in the string. Test script: --------------- <?php echo 0=='0000-00-00'; ?> Expected result: ---------------- 0 Actual result: -------------- 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61561&edit=1