|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-14 19:48 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 14:00:01 2025 UTC |
Description: ------------ Attempting to use a function to generate the value for assignment to a class constant causes a parse error. Reproduce code: --------------- <?php class MyClass { const good = "Blah"; // will work const bad = substr(0, 3, "Blah"); // results in parse error } ?> Actual result: -------------- Parse error: parse error, unexpected '(', expecting ',' or ';'