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

From: Date: Mon, 18 Aug 2014 08:12:08 +0000
Subject: Bug #67770 [Opn->Csd]: Constants inside functions
References: 1  Groups: php.standards 
Request: Send a blank email to standards-+get-388@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67770&edit=1 ID: 67770 Updated by: stas@php.net Reported by: joelm@php.net 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] joelm@php.net 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

« previous php.standards (#388) next »