note 94542 added to language.oop5.properties

From: Date: Wed, 11 Nov 2009 10:51:14 +0000
Subject: note 94542 added to language.oop5.properties
Groups: php.notes 
Request: Send a blank email to php-notes+get-162743@lists.php.net to get a copy of this message
class SimpleClass { ...... public $var4 = self::myStaticMethod(); // <- this line is wrong. ...... } the reason is : This declaration may include an initialization, but this initialization must be a constant value--that is, it must be able to be evaluated at compile time and must not depend on run-time information in order to be evaluated. ---- Server IP: 69.147.83.197 Probable Submitter: 203.93.211.48 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.properties.php Edit -- https://master.php.net/note/edit/94542 Del: integrated -- https://master.php.net/note/delete/94542/integrated Del: useless -- https://master.php.net/note/delete/94542/useless Del: bad code -- https://master.php.net/note/delete/94542/bad+code Del: spam -- https://master.php.net/note/delete/94542/spam Del: non-english -- https://master.php.net/note/delete/94542/non-english Del: in docs -- https://master.php.net/note/delete/94542/in+docs Del: other reasons-- https://master.php.net/note/delete/94542 Reject -- https://master.php.net/note/reject/94542 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#162743) next »