php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #3307 Optional Warnings Feature Request
Submitted: 2000-01-24 22:27 UTC Modified: 2000-01-24 22:33 UTC
From: chriskl at tartarus dot uwa dot edu dot au Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0.13 OS: FreeBSD
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chriskl at tartarus dot uwa dot edu dot au
New email:
PHP Version: OS:

 

 [2000-01-24 22:27 UTC] chriskl at tartarus dot uwa dot edu dot au
Just an idea:

How about adding the ability to turn on runtime 'warnings' in the PHP engine, such as when you try to read from a variable that has not been set yet, or even writing to a variable that has not been 'declared' and other such warnings.  It is just really annoying trying to debug PHP programs when it's so easy to accidentally forget to global a var in a function and use it and have things going haywire for no apparent reason...

Chris

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-24 22:33 UTC] torben at cvs dot php dot net
Already there; check the manual:

  http://www.php.net/manual/function.error-reporting.php3

<?php
$oldlevel = error_reporting( E_ALL );
/* Do something; every little thing PHP catches will be displayed. */
. . . 
error_reporting( $oldlevel ); /* Reset the old level. */
?>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 15:01:31 2024 UTC