Bug #67897 [NEW]: Closure definition affects output with relative constants

From: Date: Sun, 24 Aug 2014 06:45:27 +0000
Subject: Bug #67897 [NEW]: Closure definition affects output with relative constants
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187254@lists.php.net to get a copy of this message
From: elliotlevin at hotmail dot com Operating system: PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:Closure definition affects output with relative constants 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 bug report at https://bugs.php.net/bug.php?id=67897&edit=1 --

« previous php.bugs (#187254) next »