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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 08:01:34 2025 UTC