php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5313 define() hangs for DIE
Submitted: 2000-07-01 18:34 UTC Modified: 2000-07-03 11:10 UTC
From: a dot yeo at f5 dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.16 OS: Redhat Linux 6.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: a dot yeo at f5 dot com
New email:
PHP Version: OS:

 

 [2000-07-01 18:34 UTC] a dot yeo at f5 dot com
<html>
<body>
<?
   if (define ("DIE", 99)) {
      echo ("--DIE-- is not internally defined"); 
      echo ("<br>So, I defined it as 99 and it now becomes :");
      echo DIE;
   } else {
      echo ("--DIE-- is already defined internally as: ");
      echo DIE;
   }
</html>
</body>
---------------------------
Output turns out to be
--DIE-- is not internally defined
So, I defined it as 99 and it now becomes :1
---------------------------

If I change the constant name to something else other than
DIE, it will be OK.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-01 18:37 UTC] a dot yeo at f5 dot com
If you use DIE after you defined it in other ways
without checking the return value of define(),
it'll hang.
 [2000-07-03 11:10 UTC] stas at cvs dot php dot net
die is a keyword (pre-defined function name). DO't use it as a variable name.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 11 21:01:31 2024 UTC