ID: 45903 User updated by: laruence at yahoo dot com dot cn Reported By: laruence at yahoo dot com dot cn -Status: Closed +Status: Open Bug Type: Compile Failure Operating System: rhel-4.x PHP Version: 5.2.6 New Comment:
open Previous Comments: ------------------------------------------------------------------------ [2008-08-24 17:50:45] laruence at yahoo dot com dot cn need verified again. ------------------------------------------------------------------------ [2008-08-24 14:01:37] laruence at yahoo dot com dot cn fixed the misspell........ cause => case ------------------------------------------------------------------------ [2008-08-24 13:58:44] laruence at yahoo dot com dot cn change the os desc. ------------------------------------------------------------------------ [2008-08-24 13:52:34] laruence at yahoo dot com dot cn Description: ------------ I found when I extends from a class which is also extended from a class case the complie failed . the parsing process: starr: top_statement_list ; top_statement_list: top_statement_list .... //æçç¥ ; top_statement: .... //æçç¥ | class_declaration_statement .... //æçç¥ ; class_declaration_statement: unticked_class_declaration_statement ; unticked_class_declaration_statement: class_entry_type T_STRING extends_from .... //æçç¥ ; class_entry_type: T_CLASS .... //æçç¥ ; extends_from: /* empty */ | T_EXTENDS fully_qualified_class_name .... //æçç¥ ; fully_qualified_class_name: T_STRING { zend_do_fetch_class(&$$, &$1 TSRMLS_CC); } ; but if class with named fully_qualified_class_name is also a inherited class , there must be some mechanism to guaranteed the fully_qualified_class_name to be processed first... class Reproduce code: --------------- <?php class a extends b { }; class b extends c{ }; class c{ }; ?> Expected result: ---------------- PHP Fatal error: Class 'b' not found in /home/xinchen/1.php on line 2 Fatal error: Class 'b' not found in /home/xinchen/1.php on line 2 Actual result: -------------- http://www.laruence.com/2008/08/24/427.html ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45903&edit=1