Bug #66344 [Opn->Nab]: Problems of comparison operators

From: Date: Tue, 24 Dec 2013 11:00:08 +0000
Subject: Bug #66344 [Opn->Nab]: Problems of comparison operators
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183457@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66344&edit=1 ID: 66344 Updated by: requinix@php.net Reported by: set_saman at yahoo dot com Summary: Problems of comparison operators -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: windows 8 PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php http://www.php.net/settype Previous Comments: ------------------------------------------------------------------------ [2013-12-24 09:28:37] set_saman at yahoo dot com Description: ------------ // output : goodbye !! Test script: --------------- $v = "Colors"; echo $v.'<br>'; $v = settype($v, 'string'); echo $v.'<br>'; if($v === 'hello'){ echo 'hello'; } elseif($v == 'goodbye'){ echo 'goodbye'; } else{ echo 'no'; } // output : goodbye !! --------------------- $v = 95; echo $v.'<br>'; $v = settype($v, 'integer'); echo $v.'<br>'; if($v === 1){ echo 'hello'; } elseif($v == 'goodbye'){ echo 'goodbye'; } else{ echo 'no'; } Expected result: ---------------- I expect Output = no ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66344&edit=1

« previous php.bugs (#183457) next »