|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-21 11:21 UTC] johannes@php.net
-Type: Bug
+Type: Documentation Problem
[2010-03-21 11:21 UTC] johannes@php.net
[2010-03-22 06:18 UTC] kalle@php.net
-Package: Scripting Engine problem
+Package: Documentation problem
[2010-03-24 16:33 UTC] degeberg@php.net
[2010-03-24 16:33 UTC] degeberg@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: degeberg
[2010-03-24 16:33 UTC] degeberg@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun May 17 02:00:01 2026 UTC |
Description: ------------ I tried to define constant using new const keyword structure in PHP 5.3. This one worked fine: -- $ cat test1.php <?php const FOO = 1; echo FOO; -- I checkd also this one: $ cat test2.php -- <?php if(true) { define('FOO', 1); } echo FOO; -- But this one crushes: -- $ cat test3.php <?php if(true) { const FOO = 1; } echo FOO; -- In fact im not using PHP 5.3.2, but PHP 5.3.1, but i don't have any place to test it against PHP 5.3.2 and I don't see fix for this issue on changelog fixes list. Expected result: ---------------- 1 1 1 Actual result: -------------- 1 1 Parse error: syntax error, unexpected T_CONST in /home/wrzasq/public_html/engine/chillout/projects/application/test3.php on line 4