Bug #67770 [Opn->Csd]: Constants inside functions

[email protected]
Newsgroups php.standards
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=67770&edit=1

 ID:                 67770
 Updated by:         [email protected]
 Reported by:        [email protected]
 Summary:            Constants inside functions
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            PHP Language Specification
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        stas
 Block user comment: N
 Private report:     N

 New Comment:

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.

Fixed now.


Previous Comments:
------------------------------------------------------------------------
[2014-08-05 16:48:01] [email protected]

Description:
------------
https://github.com/php/php-langspec/blob/master/spec/07-variables.md#constants

"A constant defined inside a function has function scope." This is not correct. c-constants defined in pseudomains and d-constants are available everywhere, their scope is not limited to a single function or a single pseudomain.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67770&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.