|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67000 @MYCONST evaluates to string "MYCONST"
Submitted: 2014-04-01 13:39 UTC Modified: 2014-04-01 13:42 UTC
From: aleemb at gmail dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.5.10 OS: Ubuntu 12.04
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.
Block user comment
Status: Assign to:
Bug Type:
From: aleemb at gmail dot com
New email:
PHP Version: OS:


 [2014-04-01 13:39 UTC] aleemb at gmail dot com
The script below illustrates the issue.

Test script:
DEFINE('FOO', false);

if (@BAR) {
  echo "this is wrong.";
} else {
  echo "this is correct.";

if (@FOO) {
  echo "this is wrong.";
} else {
  echo "this is correct.";


Expected result:
this is correct.this is correct.NULL

Actual result:
this is wrong.this is correct.string(3) "BAR"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-01 13:42 UTC]
-Status: Open +Status: Not a bug
 [2014-04-01 13:42 UTC]
Drop the @ (the error suppression operator) and you'll understand.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 22:01:33 2024 UTC