Re: Bug #5772 Updated: if ("" == "0") inconsistent behavior on IIS 4.0
| From: | Steve Yates | Date: | Mon, 24 Jul 2000 23:14:29 +0000 |
| Subject: | Re: Bug #5772 Updated: if ("" == "0") inconsistent behavior on IIS 4.0 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-25909@lists.php.net to get a copy of this message | ||
On 24 Jul 2000 22:43:33 -0000, Bug Database wrote:
>ID: 5772
>Updated by: joey
>Reported By: steve@teamits.com
>Status: Feedback
>Bug Type: Misbehaving function
>Assigned To:
>Comments:
>
>The CGI on both win32 and Unix returns the same for me using this test.
>Instead of this workaround you have invented, why not use:
>
>if (strpos(strtolower($line), '</body') !== FALSE) {
>
>(Which I'd venture a guess is already being used, in one form or another,
>on the Unix box)
>
>Double check and make sure that the Unix and the NT box really are using
>the same code, and one is not using === ( or a variant thereof )
>
>Full Bug description available at: http://bugs.php.net/?id=5772
>
>
Yes, they are using the same code:
if (strpos(strtolower($line), '</body') == "0") {
This is odd, then. Could this be a difference between 3.x and 4.x? I
will doublecheck my other server to see what it's doing, but I swear
it's working on PWS 4.0 and Windows 98 SE. Hmmm, I *am* using ISAPI on
that server...
In this case, FALSE won't work. If "</body" is the first part
of the line, strpos() returns "0" which is interpreted as false. At
least I'm assuming it will since "if (strpos(...))" evaluates as false
in that case.
---------------------------------------------------
Steve Yates
Integrated Technical Solutions, Inc.
E-Mail - steve@teamITS.com
Web - www.teamITS.com
Phone - 630.420.2550
Fax - 630.420.2771