#42352 [Opn->Bgs]: instanceof get_class() generate parse error

From: Date: Mon, 20 Aug 2007 17:37:34 +0000
Subject: #42352 [Opn->Bgs]: instanceof get_class() generate parse error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-116376@lists.php.net to get a copy of this message
ID: 42352 Updated by: johannes@php.net Reported By: jausions@php.net -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Irrelevant PHP Version: 5.2.3 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2007-08-20 17:10:06] jausions@php.net 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 this bug report at http://bugs.php.net/?id=42352&edit=1

« previous php.bugs (#116376) next »