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:3
Avg. Score:2.3 ± 1.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC