ID: 28968 Updated by: [EMAIL PROTECTED] Reported By: james_mitchell_au at yahoo dot com dot au -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Windows PHP Version: 4.3.7 New Comment:
That's the correct behaviour... Please see the operators page in manual and find '===' operator.. Previous Comments: ------------------------------------------------------------------------ [2004-06-30 08:51:47] james_mitchell_au at yahoo dot com dot au Description: ------------ This is as wierd and unique as problems get. Look at the following line in my code: if(strcmp($grid[$x-1][$y],'-')==0) { On the machine I Was building it on, I tried: if($grid[$x-1][$y] == '-') { millions of times, and each time it would compare the value '0' with '-' and return true, I checked that same line of code hundreds of times, till I finally went to try strcmp and it worked fine I have had previous problems on another machine a RH Linux one, when comparing 3's at which time I used trim() but that was using an earlier version of 4, probably near a year ago. But had not had similair problems up until now. I tried this on another machine just now and it worked fine.. I don't have access to the machine the problem was occuring on at this current time, but I will try to with in the next couple of days and get the machine specs to better describe them, hopefully get someone to match them up against and test it. The test data to use is: *************** *o*-----*-*---* *-*****-*-*-*-* *---------*-*-* *-****-**-*-*-* *-*--*-**-*-*-* *-*--*------*-* *-*-**-*-**-*-* *---*--*-**-*o* *************** Reproduce code: --------------- http://kicken.mine.nu:8008/extras/bugs/task5.phps Expected result: ---------------- *************** *o*-----*-*ooo* *o*****-*-*o*o* *oooooo---*o*o* *-****o**-*o*o* *-*--*o**-*o*o* *-*--*oooooo*o* *-*-**-*-**-*o* *---*--*-**-*o* *************** With successful run, and nothing on an unsuccessful run ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28968&edit=1