Bug #67897 [Opn->Asn]: Closure definition affects output with relative constants
| From: | dmitry@php.net | Date: | Thu, 14 Jul 2016 11:17:41 +0000 |
| Subject: | Bug #67897 [Opn->Asn]: Closure definition affects output with relative constants | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202313@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67897&edit=1
ID: 67897
Updated by: dmitry@php.net
Reported by: elliotlevin at hotmail dot com
Summary: Closure definition affects output with relative
constants
-Status: Open
+Status: Assigned
Type: Bug
Package: Scripting Engine problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: dmitry
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2014-08-24 06:45:26] elliotlevin at hotmail dot com
Description:
------------
When the closure is defined should not affect the output in this script.
HHVM operates as one would expect, but all versions of PHP supporting namespaces do not return the
correct constant if the closure is defined before the relative constant is.
Test script:
---------------
http://3v4l.org/6loRa
Expected result:
----------------
string(19) "IN GLOBAL NAMESPACE"
string(21) "IN RELATIVE NAMESPACE"
string(21) "IN RELATIVE NAMESPACE"
Actual result:
--------------
string(19) "IN GLOBAL NAMESPACE"
string(19) "IN GLOBAL NAMESPACE"
string(21) "IN RELATIVE NAMESPACE"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67897&edit=1