php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33444 resterict access on constants
Submitted: 2005-06-23 08:59 UTC Modified: 2006-04-03 13:36 UTC
From: j dot amel83 at gmail dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.0.4 OS: Win XP, Apache 2.0.54
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: j dot amel83 at gmail dot com
New email:
PHP Version: OS:

 

 [2005-06-23 08:59 UTC] j dot amel83 at gmail dot com
Description:
------------
there is an error when I try to difine a constant with protected/private modifier

Reproduce code:
---------------
<?php
class User {
		/* 
		 *max time in seconds that a user can be idle in the system 
		 */
       protected const MAX_IDLE_TIME = 900;
	   
	   /*
	    *
		*
		*/
}

Actual result:
--------------
Parse error: syntax error, unexpected T_CONST, expecting T_VARIABLE in D:\ApacheWebServerRootDirectory\ab-candles\bug.php on line 6

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-23 09:03 UTC] j dot amel83 at gmail dot com
define*
 [2006-04-03 13:36 UTC] tony2001@php.net
Duplicate of bug #27022.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Dec 30 10:00:01 2025 UTC