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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: elliotlevin at hotmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Nov 23 08:01:28 2024 UTC