ID: 46337 User updated by: webmaster at adriaportal dot com Reported By: webmaster at adriaportal dot com Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows NT 5.2 build 3790 PHP Version: 5.2.6 New Comment:
I'm cannot english language so good, only pasiv, but why is conflict when word 'use' in this fall is called as part of a structure, a closed block, and the syntax is here $instance->method() and this is different as method() or method. This is a bad isolation of programm blocks. In Java can you write: public class Use { public static void main(String[] args) { Use use = new Use(); use.use(); } public Use() { } public void use() { } } And this class work without any problem. And cherio, i'm must work to. Previous Comments: ------------------------------------------------------------------------ [2008-10-18 18:00:59] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ [2008-10-18 17:44:14] webmaster at adriaportal dot com Description: ------------ Error by using method with name use(); !!!! No error with method name changed to _use() !!!! Reproduce code: --------------- <?php class Block { private $block = ""; private $value = ""; private $name = ""; private $out = ""; function __construct($blockName) { $this->name = $blockName; } public function use() { $this->value = $this->block; $this->out = ""; } } ?> Expected result: ---------------- No error. The word USE is very USED by programming. Here is used in a class block of code as name of method, bud here is a conflict with may by documented keyword use in PHP. The namespace use this keyword. Actual result: -------------- Parse error: syntax error, unexpected T_USE, expecting T_STRING in C:\webs\test\bug.php on line 15 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46337&edit=1