note 85013 modified in function.error-reporting by danbrown
| From: | danbrown@php.net | Date: | Fri, 24 Oct 2008 18:33:35 +0000 |
| Subject: | note 85013 modified in function.error-reporting by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-145702@lists.php.net to get a copy of this message | ||
this is to show all errors for code that may be run on different versions
for php 5 it shows E_ALL^E_STRICT and for other versions just E_ALL
if anyone sees any problems with it please correct this post
<?php
ini_set('error_reporting', version_compare(PHP_VERSION,5,'>=') &&
version_compare(PHP_VERSION,6,'<') ?E_ALL^E_STRICT:E_ALL);
?>
--was--
this is to show all errors for code that may be run on different versions
for php 5 it shows E_ALL^E_STRICT and for other versions just E_ALL
if anyone sees any problems with it please correct this post
ini_set('error_reporting', version_compare(PHP_VERSION,5,'>=') &&
version_compare(PHP_VERSION,6,'<') ?E_ALL^E_STRICT:E_ALL);
http://php.net/manual/en/function.error-reporting.php