php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80750 @ breaks functions
Submitted: 2021-02-14 09:02 UTC Modified: 2021-02-14 09:04 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: pavlusha23 at gmail dot com Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: 8.0.2 OS: All
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pavlusha23 at gmail dot com
New email:
PHP Version: OS:

 

 [2021-02-14 09:02 UTC] pavlusha23 at gmail dot com
Description:
------------
When using the @ symbol, the error_reporting function does not work.

Test script:
---------------
@error_reporting(0);    
var_dump(error_reporting());
error_reporting(0);    
var_dump(error_reporting());

Expected result:
----------------
int(0)
int(0)

Actual result:
--------------
int(32767)
int(0)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-14 09:04 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 [2021-02-14 09:04 UTC] requinix@php.net
Duplicate of bug #80700
 [2021-02-14 09:04 UTC] requinix@php.net
Duplicate of bug #80700
 [2021-08-27 21:42 UTC] antonino dot spampinato86 at gmail dot com
// Turn off all error reporting
error_reporting(0);
//Previous php 8.0 Error Control Operators is 0, after is mask check "variable"

//bad code
@error_reporting(0);

The @ operator will no longer silence fatal errors (E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR, E_PARSE). Error handlers that expect error_reporting to be 0 when @ is used, should be adjusted to use a mask check instead
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC