php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67769 c-constant being a superglobal
Submitted: 2014-08-05 16:45 UTC Modified: 2014-08-18 08:13 UTC
From: joelm@php.net Assigned: stas (profile)
Status: Closed Package: PHP Language Specification
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joelm@php.net
New email:
PHP Version: OS:

 

 [2014-08-05 16:45 UTC] joelm@php.net
Description:
------------
Saying that a c-constant defined in pseudo-main is a "superglobal" is confusing. I understand it's trying to say that it is always in scope, but this clashes with php.net which only uses the term "superglobal" to refer to special variable tokens ("$GLOBALS", "$_SERVER", etc) that will be always treated as referring to a global variable instead of a local variable. A few sentences later this is phrased more clearly/correctly saying "A constant defined at the pseudo-main level has script scope".

(This may have been fixed already).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-18 08:13 UTC] stas@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: stas
 [2014-08-18 08:13 UTC] stas@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

I think in current version definition of superglobal is usable for constants too. Please reopen if you disagree.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC