|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-11-17 13:22 UTC] jtaal at eljakim dot nl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 00:00:01 2025 UTC |
Description: ------------ The PHP parser currently cannot handle "__CLASS__" directly after "instanceof". I think this should be possible. Reproduce code: --------------- class myclass { function mymethod($otherObject) { if ($otherObject instanceof __CLASS__) { $otherObject->mymethod(null); } return 'works!'; } } $a = new myclass(); print $a->mymethod($a); Expected result: ---------------- works! Actual result: -------------- Parse error: syntax error, unexpected T_CLASS_C, expecting T_STRING or T_VARIABLE or '$' in ... on line 4