php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67897 Closure definition affects output with relative constants
Submitted: 2014-08-24 06:45 UTC Modified: 2016-07-14 11:17 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: elliotlevin at hotmail dot com Assigned: dmitry (profile)
Status: Assigned Package: Scripting Engine problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-08-24 06:45 UTC] 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"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-14 11:17 UTC] dmitry@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC