[PHP-BUG] Bug #73308 [NEW]: php ver 7.0.4,5.6.8
[email protected] ("13353540 at qq dot com") Wed, 12 Oct 2016 17:08:22 GMT
| Newsgroups | php.standards |
|---|---|
| Message-ID | <[email protected]> |
From: 13353540 at qq dot com
Operating system: centos6,7
PHP version: 7.0.11
Package: PHP Language Specification
Bug Type: Bug
Bug description:php ver 7.0.4,5.6.8
Description:
------------
I'm sorry.Bug #73304,#73305,#73306 is wrong.
Hello,
It is a sample script.I think the script will be print 2,but 1.
If I change:
if($ret_obj->result==false && $ret_obj->code=99 )
to:
if($ret_obj->result=="aa" && $ret_obj->code=99 )
It's print 2.
I tested this script in version 7.0.4,5.6.8,have the same problem
Regards,
Jian Zhao
Test script:
---------------
<?
error_reporting(E_ERROR);
$ret="";
$ret_obj=json_decode($ret);
if($ret_obj->result==false && $ret_obj->code=99 )
echo 1;
else
echo 2;
exit;
?>
Expected result:
----------------
print 2
Actual result:
--------------
print 1
--
Edit bug report at https://bugs.php.net/bug.php?id=73308&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73308&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73308&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73308&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73308&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73308&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73308&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73308&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73308&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73308&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73308&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73308&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73308&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73308&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73308&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73308&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73308&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73308&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73308&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73308&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73308&r=mysqlcfg