php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17393 @ operator does not work properly
Submitted: 2002-05-23 13:32 UTC Modified: 2002-06-06 20:33 UTC
From: ferguson at knightsweb dot net Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.2.1 OS: Win98
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: ferguson at knightsweb dot net
New email:
PHP Version: OS:

 

 [2002-05-23 13:32 UTC] ferguson at knightsweb dot net
When using set_error_handler() the @ operator does not work.

It could be that it is not ment to work! If this is the case, i cant seem to find a way to tell if there was a @ request while using set_error_handler!

This is what i mean. This code presumes that there is a function named FunctionName that is desinged to handle errors... or there would be another error i couldnt fix with @ :) (code not tested)

eg.

error_reporting (E_ALL);

$NewArray['ThisIsHere'] = 'This is good';

echo $NewArray['ThisIsNotHere'];  // would report error
echo @$NewArray['ThisIsNotHere']; // would not reprot error
echo $NewArray['ThisIsHere'];     // would not report error

set_error_handler('FunctionName')

echo $NewArray['ThisIsNotHere'];  // would report error
echo @$NewArray['ThisIsNotHere']; // would reprot error
echo $NewArray['ThisIsHere'];     // would not report error


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-06 20:33 UTC] sniper@php.net
This is documented  here:

http://www.php.net/manual/en/function.set-error-handler.php

Not a bug.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 16:01:34 2025 UTC