php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60258 INI Setting for Error Control Operator
Submitted: 2011-11-11 08:59 UTC Modified: 2021-09-14 10:56 UTC
Votes:7
Avg. Score:3.0 ± 1.1
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: rayro at gmx dot de Assigned:
Status: Suspended Package: Output Control
PHP Version: 5.4.0RC1 OS: Any
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
48 + 2 = ?
Subscribe to this entry?

 
 [2011-11-11 08:59 UTC] rayro at gmx dot de
Description:
------------
Hey there,

Every day I ran in some Problems wasting time to debug code, since the peoples are often using the error control operator (any software):

  http://de3.php.net/manual/en/language.operators.errorcontrol.php

It would be nice to see a php.ini directive, e.g. "error_controll_operators = 1|0", to disable or enable the silencing of php errors. 

Another old report (see #14192) was closed by jani@php.net, referring to some extension and xdebug. But, as controll operators itself are in the core, i think there SHOULD also be the option to disable/enable it...?

Thanks alot

Test script:
---------------
<?php
ini_set('error_controll_operators',0);
@anyNonExistingFunction();
?>

Expected result:
----------------
Fatal error: Call to undefined function anyNonExistingFunction() in /root/test.php on line 3


Actual result:
--------------
Empty Output

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-11 12:26 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2011-11-11 12:26 UTC] aharvey@php.net
You can use the PECL scream extension or Xdebug with the xdebug.scream option to 
disable the error suppression operator.
 [2011-11-11 12:49 UTC] pajoye@php.net
-Status: Wont fix +Status: Analyzed
 [2011-11-11 12:49 UTC] pajoye@php.net
Actually the more I look into that the more I want this thing in the core, as an 
ini setting and an API to disable it.

Let move to analyzed and see what can be done for 5.4+1.
 [2013-02-05 11:18 UTC] rayro at gmx dot de
Any luck to make this possible?

Now my opinion about that changes since the report:
REMOVE THIS DIRTY FEATURE ... :-)
It does not make sense to use it in production environment, or am i wrong?

It is even not a parser token, but i realized a little script to remove these operators from php files.

thx
 [2021-09-14 10:55 UTC] cmb@php.net
This is certainly a controversial topic, and as such needs the RFC
process[1].  Anybody who is interested in this feature is welcome
to pursue it; for the time being, I suspend this ticket.

[1] <https://wiki.php.net/rfc/howto>
 [2021-09-14 10:56 UTC] cmb@php.net
-Status: Analyzed +Status: Suspended
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC