|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-04-12 07:38 UTC] nikic@php.net
-Status: Open
+Status: Feedback
[2019-04-12 07:38 UTC] nikic@php.net
[2019-04-21 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 04:00:02 2025 UTC |
Description: ------------ When we specify a class name with scope resolution operator just before the class description. Then the incorrect syntax tree is parsed by zend parser. When a word is typed after the scope resolution operator, then zend parses correct syntax tree. This issue starts occurring from zend parser for php-5.6 onwards. This issue only occurs in the scenario when scope resolution operator is specified for same class whose declaration has been specified in the next statement. A digraph generated for the syntax tree has been specified in the expected result and actual result. As you can see, when scope resolution operator is specified, the label "SMTP" related to class name gets removed. Test script: --------------- <?php SMTP:: class SMTP { const VERSION = '5.2.22'; } ?> Expected result: ---------------- digraph dbg_AST { rankdir=LR node0 [shape=point, label="<notext>"] node1 [shape=rect, label="SMTP"] node0->node1 node2 [shape=octagon, label="SMTP"] node0->node2 node3 [shape=point, label="<notext>"] node2->node3 node4 [shape=point, label="<notext>"] node2->node4 node5 [shape=point, label="<notext>"] node4->node5 node6 [shape=hexagon, label="VERSION"] node5->node6 node7 [shape=note, label="5.2.22"] node6->node7 node8 [shape=rect, label="?> ¶"] node0->node8 node9 [shape=rect, label="<internal>"] node0->node9 node10 [shape=rect, label=" ¶"] node9->node10 } Actual result: -------------- digraph dbg_AST { rankdir=LR node0 [shape=point, label="<notext>"] node1 [shape=point, label="<notext>"] node0->node1 node2 [shape=note, label="5.2.22"] node1->node2 node3 [shape=rect, label="?> ¶"] node0->node3 node4 [shape=rect, label="<internal>"] node0->node4 node5 [shape=rect, label=" ¶"] node4->node5 }