|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2003-10-22 01:21 UTC] alan_k@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 15:00:01 2025 UTC | 
Description: ------------ I compare two strings, who are different from each other. The if-Statement gives me a "true". I want a "false". Reproduce code: --------------- $val1="020510010404020301"; $val2="020510010404020302"; if( $val1 == $val2 ) { echo $val1; echo "<br>"; echo $val2; echo "<br>"; echo "is not good"; } else { echo "yeah"; } Expected result: ---------------- go into the "else" Actual result: -------------- go into the "if" Note: var_dump() used with $var1 and $var2 gives me string(18) strcmp() works fine.