|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32428 The @ warning error supression operator is broken
Submitted: 2005-03-23 13:46 UTC Modified: 2005-06-06 13:21 UTC
From: jason at amp-design dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2005-03-23 (dev) OS: Cent OS 3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
10 + 5 = ?
Subscribe to this entry?

 [2005-03-23 13:46 UTC] jason at amp-design dot net
The @ operator that is used to supress errors about warnings and other non critical errors such as notices seems to be broken in this mornings snapshot of 5.1.0. This is quite fustrating as it's handy to use the @ operator when you want pass NULL when the variable doesn't exist.

Reproduce code:
<?php $data = @$not_exists; ?>

Expected result:
$data is assigned with NULL without an error message

Actual result:
Notice: Undefined variable: not_exists in /data/web/tools/iq_framework/test.php on line 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-23 16:46 UTC]
I can confirm this issue.
(reproducible in HEAD only) 
 [2005-06-06 13:21 UTC]
Fixed in CVS HEAD.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 11:03:36 2021 UTC