note 84421 deleted from language.oop5.static by cmb

From: Date: Sun, 01 Sep 2019 07:30:17 +0000
Subject: note 84421 deleted from language.oop5.static by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212057@lists.php.net to get a copy of this message
Note Submitter: michaelnospamdotnospamdaly at kayakwiki ---- Further to the comment by "erikzoltan NOSPAM at msn NOSPAM dot com" on 05-Apr-2005 03:40, It isn't just constructors that can't be used for static variable initialization, it's functions in general: class XYZ { static $foo = chr(1); // will fail } You have to do external initialization: XYZ::$foo = chr(1); class XYZ { static $foo; }

« previous php.notes (#212057) next »