Edit report at https://bugs.php.net/bug.php?id=64637&edit=1
ID: 64637
Comment by: rstoll at tutteli dot ch
Reported by: rstoll at tutteli dot ch
Summary: redefine NULL
Status: Feedback
Type: Bug
Package: *Languages/Translation
Operating System: windows
PHP Version: 5.4.7
Block user comment: N
Private report: N
New Comment:
I still got the "hello world" even without any extension. The output is slightly
different, I got NULL instead of null without xdebug. But still
NULL
NULL
NULL
string(11) "hello world"
Notice: Constant null already defined
for PHP 5.3.5 and PHP 5.4.7
In my opinion this bug can be closed because probably no one will ever do this.
As side mark, also http://3v4l.org/8knru does not show a notice
for the first define. Thus the implementation is not entirely correct. I assume your PHP version
behaves differently than mine in terms of symbol resolution. In my PHP version the case matters. So
if I write NULL a different symbol is resolved than when I write null. In your version always null
is resolved. That could be the reason why you do not get "hello world" as output. But I do
not really know the internals of PHP, it's just an assumption.
Previous Comments:
------------------------------------------------------------------------
[2013-04-15 03:04:09] laruence@php.net
please try again with a pure PHP (without any extension which will alter PHP
behavior, like xdebug, xhprof, apc/opcache, or taint)
thanks
------------------------------------------------------------------------
[2013-04-12 18:32:53] rstoll at tutteli dot ch
strange that you do not have the same problem. However, a notice should already be shown for the
first usage of define.
------------------------------------------------------------------------
[2013-04-12 16:57:14] anon at anon dot anon
Tested on PHP 5.3.5 on Windows and I just get NULL as output all four times, and then the notice.
Seems normal.
------------------------------------------------------------------------
[2013-04-12 11:21:28] rstoll at tutteli dot ch
Maybe the bug only exists on windows.
I got the error for 5.4.7 and 5.3.5
------------------------------------------------------------------------
[2013-04-12 04:14:04] laruence@php.net
http://3v4l.org/8knru
I didn't see a "hello world" outputted
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=64637--
Edit this bug report at https://bugs.php.net/bug.php?id=64637&edit=1