note 113054 added to language.oop5.properties
| From: | singhkumardinesh at gmail dot com | Date: | Fri, 23 Aug 2013 08:54:06 +0000 |
| Subject: | note 113054 added to language.oop5.properties | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196056@lists.php.net to get a copy of this message | ||
if you run this below program it will through the error. but in the example related we have shown
that it is possible.
class example {
public $public = self::getStaticFunction();
static function getStaticFunction(){
return 1+1;
}
}
$obj = new example();
echo $obj->public;
ERROR:
( ! ) Parse error: syntax error, unexpected '(', expecting ',' or ';'
in C:\wamp\www\php\class.php on line 3
----
Server IP: 69.147.83.199
Probable Submitter: 122.177.157.58
----
Manual Page -- http://php.net/manual/en/language.oop5.properties.php
Edit -- https://master.php.net/note/edit/113054
Del: integrated -- https://master.php.net/note/delete/113054/integrated
Del: useless -- https://master.php.net/note/delete/113054/useless
Del: bad code -- https://master.php.net/note/delete/113054/bad+code
Del: spam -- https://master.php.net/note/delete/113054/spam
Del: non-english -- https://master.php.net/note/delete/113054/non-english
Del: in docs -- https://master.php.net/note/delete/113054/in+docs
Del: other reasons-- https://master.php.net/note/delete/113054
Reject -- https://master.php.net/note/reject/113054
Search -- https://master.php.net/manage/user-notes.php