function reserved word.
| From: | Ahmed KOOLI | Date: | Wed, 24 Jun 2015 15:53:01 +0000 |
| Subject: | function reserved word. | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-21445@lists.php.net to get a copy of this message | ||
Hello,
According to php language syntax, a class method declaration should contain the reserved word
"function".
Example:
class myClass
{
Public function myFunction(){};
}
This issue is probably related to previous versions where php does not support objects yet.
However, I wonder why php does not follow Java and C++ method syntax, and make the use of
"function" word optional:
class myClass
{
Public myFunction(){};
}
Best regards,
Ahmed KOOLI
Tél Direct : +33 1 53 38 86 72