#42352 [NEW]: instanceof get_class() generate parse error
| From: | jausions@php.net | Date: | Mon, 20 Aug 2007 17:10:06 +0000 |
| Subject: | #42352 [NEW]: instanceof get_class() generate parse error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-116375@lists.php.net to get a copy of this message | ||
From: jausions@php.net
Operating system: Irrelevant
PHP version: 5.2.3
PHP Bug Type: Scripting Engine problem
Bug description: instanceof get_class() generate parse error
Description:
------------
insteanceof and get_class() don't play nice. The following line of code
produces a parsing error.
Reproduce code:
---------------
<?php
if ($a instanceof get_class($b)) {
echo 'Yeah!';
}
?>
Expected result:
----------------
Parsing fine
Actual result:
--------------
Parse error: parse error, unexpected '('
--
Edit bug report at http://bugs.php.net/?id=42352&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42352&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42352&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42352&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42352&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42352&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42352&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42352&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42352&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42352&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42352&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42352&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42352&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42352&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42352&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42352&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42352&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42352&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42352&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42352&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42352&r=mysqlcfg