Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.2.2

Bug #5115 Visibility modifiers in method declaration throws parse error
Submitted: 2005-08-16 23:46 UTC
From: luis at m3 dot net Assigned: cellog
Status: Closed Package: PHP_Parser
PHP Version: 5.0.4 OS: Fedora Core 2
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 12 + 47 = ?

 
 [2005-08-16 23:46 UTC] luis at m3 dot net
Description: ------------ Parsing a method declaration containing visibility modifiers, such as public/private/protected, causes the parser to throw an error. Test script: --------------- <?php class myClass { private function _myMethod() { } } ?> Actual result: -------------- object(PEAR_Error) 'error_message_prefix' => '' 'mode' => 1 'level' => 1024 'code' => null 'message' => 'Error at line 5, Unexpected T_FUNCTION, syntax error' 'userinfo' => null 'backtrace' => array 0 => array 'file' => '/home/luis/myProjects/workspace/coolFramework/lib/pear/PEAR.php' 'line' => 542 'function' => 'PEAR_Error' 'class' => 'PEAR_Error' 'type' => '->' 'args' => array 0 => 'Error at line 5, Unexpected T_FUNCTION, syntax error' 1 => null 2 => 1 3 => 1024 4 => null 1 => array 'file' => '/home/luis/myProjects/workspace/coolFramework/lib/pear/PHP/Parser/Core.php' 'line' => 357 'function' => 'raiseError' 'class' => 'PHP_Parser_Core' 'type' => '->' 'args' => array 0 => 'Error at line 5, Unexpected T_FUNCTION, syntax error' 2 => array 'file' => '/home/luis/myProjects/workspace/coolFramework/lib/pear/PHP/Parser/Core.php' 'line' => 518 'function' => 'raiseError' 'class' => 'PHP_Parser_Core' 'type' => '->' 'args' => array 0 => 'Error at line 5, Unexpected T_FUNCTION, syntax error' 1 => array 0 => 'end-of-file' 1 => 'T_STATIC' 2 => 'T_ABSTRACT' 3 => 'T_FINAL' 4 => 'T_PRIVATE' 5 => 'T_PROTECTED' 6 => 'T_PUBLIC'

Comments

 [2007-02-21 05:58 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!