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
 [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: Thu Dec 26 10:01:29 2024 UTC