Bug #64637 [Opn]: redefine NULL
| From: | rstoll at tutteli dot ch | Date: | Fri, 12 Apr 2013 18:32:53 +0000 |
| Subject: | Bug #64637 [Opn]: redefine NULL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-178446@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64637&edit=1
ID: 64637
User updated by: rstoll at tutteli dot ch
Reported by: rstoll at tutteli dot ch
Summary: redefine NULL
Status: Open
Type: Bug
Package: *Languages/Translation
Operating System: windows
PHP Version: 5.4.7
Block user comment: N
Private report: N
New Comment:
strange that you do not have the same problem. However, a notice should already be shown for the
first usage of define.
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
[2013-04-11 23:23:28] rstoll at tutteli dot ch
Description:
------------
It is possible to redefine NULL (however, not null). No one probably does that but it should not be
possible. Maybe there are more of this kind of errors.
Test script:
---------------
var_dump(null); // null
var_dump(NULL); // null
define("NULL","hello world");
var_dump(null); // null
var_dump(NULL); // hello world
define("null","hello world"); //Notice: Constant null already defined
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64637&edit=1