bugs.php.net

 [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"

Read the original on bugs.php.net ↗