#27459 [Opn]: Error handling page should use constants instead of raw integers

From: Date: Tue, 02 Mar 2004 14:36:05 +0000
Subject: #27459 [Opn]: Error handling page should use constants instead of raw integers
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969359347@lists.php.net to get a copy of this message
ID: 27459 Updated by: derick@php.net Reported By: cellog@php.net Status: Open Bug Type: Documentation problem Operating System: na PHP Version: Irrelevant New Comment: in addition to this the example missses E_STRICT and the information in the table above has "PHP 4 only" while correct is "PHP 4 and PHP 5 only". Previous Comments: ------------------------------------------------------------------------ [2004-03-02 09:29:40] cellog@php.net Description: ------------ at http://www.php.net/manual/en/ref.errorfunc.php the example uses raw integers instead of error constants: $errortype = array ( 1 => "Error", 2 => "Warning", 4 => "Parsing Error", 8 => "Notice", 16 => "Core Error", 32 => "Core Warning", 64 => "Compile Error", 128 => "Compile Warning", 256 => "User Error", 512 => "User Warning", 1024 => "User Notice" ); This should use E_ERROR, E_WARNING, etc. Using the raw numbers is not best practice, and should not be encouraged. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27459&edit=1

« previous php.doc (#969359347) next »