Bug #75980 [Fbk->Opn]: greater or equal (formerly >=) is missinterpreted

From: Date: Mon, 19 Feb 2018 12:41:38 +0000
Subject: Bug #75980 [Fbk->Opn]: greater or equal (formerly >=) is missinterpreted
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214023@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75980&edit=1

 ID:                 75980
 User updated by:    rolf at rolfjentsch dot de
 Reported by:        rolf at rolfjentsch dot de
-Summary:            greater or equal formerly >= is missinterpreted
+Summary:            greater or equal (formerly >=) is missinterpreted
-Status:             Feedback
+Status:             Open
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   windows 10 xamp
 PHP Version:        7.2.2
 Block user comment: N
 Private report:     N

 New Comment:

Processing a .php document is done wrong imho.

When a statement like "if (strpos($_SERVER['SERVER_ADDR'],"192.168.10")
>= 0)"
is proccessed it does not compare but finishes to interpret (which would be fine if there is a
"?>") but the compare option ">=" finishes interpretation of the source
and echoes in the above example "= 0)"

This appplies to all php 7 versions i have tested so far either on ubuntu or on xammp.


Previous Comments:
------------------------------------------------------------------------
[2018-02-19 12:18:30] peehaa@php.net

It's not clear at all what this bug report is trying to... report.

Please provide clear information regarding the expected output, the actual output and a proper test
case.

------------------------------------------------------------------------
[2018-02-19 12:13:26] rolf at rolfjentsch dot de

Description:
------------
Problem arrises when >= is processed something like "= 0) { $where="http://qnap/piwik/"; }" is echoed  instead of doing
what it did in php 5.6

Below is a test script to reproduce the error

Test script:
---------------
<?
if (isset($_SERVER['SERVER_ADDR'])) 
{
	if (strpos($_SERVER['SERVER_ADDR'],"192.168.10") >= 0)
	{
		$where="http://qnap/piwik/";
	}
	else
	{
		$where="https://someurlhere/";
	} 
} else $where="https://someurlhere/";
?>



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=75980&edit=1


Thread (16 messages)

« previous php.bugs (#214023) next »