Bug #70528 [NEW]: assert() with instanceof adds apostrophes around class name
| From: | php-bugs at majkl578 dot cz | Date: | Fri, 18 Sep 2015 21:07:13 +0000 |
| Subject: | Bug #70528 [NEW]: assert() with instanceof adds apostrophes around class name | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-196078@lists.php.net to get a copy of this message | ||
From: php-bugs at majkl578 dot cz
Operating system: Linux x86_64
PHP version: 7.0.0RC3
Package: Scripting Engine problem
Bug Type: Bug
Bug description:assert() with instanceof adds apostrophes around class name
Description:
------------
In the script below there is a Foo\Bar class used in instanceof test
inside assert().
When this assertion fails, warning/error is produced, but the class name
is surrounded by apostrophes.
Test script:
---------------
<?php
namespace Foo;
class Bar {}
assert(new \stdClass instanceof Bar);
Expected result:
----------------
Warning: assert(): assert(new \stdClass() instanceof Bar) failed
Actual result:
--------------
Warning: assert(): assert(new \stdClass() instanceof 'Bar') failed
--
Edit bug report at https://bugs.php.net/bug.php?id=70528&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70528&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70528&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70528&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70528&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70528&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70528&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70528&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70528&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70528&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70528&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70528&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70528&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70528&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70528&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70528&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70528&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70528&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70528&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70528&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70528&r=mysqlcfg