|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-04 11:32 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 20:00:01 2025 UTC |
Description: ------------ It seems that initializing static class member with constant expression generates a syntax error Reproduce code: --------------- <?php class C { static public $m = 1 + 2; // syntax error ! }; ?> Expected result: ---------------- There should not be any compilation error Actual result: -------------- PHP Parse error: syntax error, unexpected '(' in /var/www/html/test.php on line 3