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
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: 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

Pull Requests

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-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 14 03:00:01 2026 UTC