php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #8194 Need for a "const" qualifier.
Submitted: 2000-12-11 13:51 UTC Modified: 2003-01-18 12:57 UTC
From: php at digdug dot cx Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.3pl1 OS:
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: php at digdug dot cx
New email:
PHP Version: OS:

 

 [2000-12-11 13:51 UTC] php at digdug dot cx
It would be really swell to have a qualifier that makes a variable visible in functions by default. Right now, it is a real annoyance to have to global every constant that you use in the function.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-11 13:54 UTC] derick@php.net
The same is true for me, I really like somthing like that.
 [2000-12-11 14:08 UTC] waldschrott@php.net
would be nice performance-wise using classes especially
where it sometimes happens that you are global'ing the same
vars in several methods

 [2003-01-18 12:57 UTC] andrey@php.net
 Yes, define() is longer to write but is useful.
In PHP 5 there will be support for constants in classes. So wait for it :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC