mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-29 08:11:11 +02:00
Style consistency Round 2
- spacing of jekyll tags at top of file - line wrap at 120 chars - url/link verification and move to bottom and order
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
---
|
||||
isChild: true
|
||||
anchor: error_reporting
|
||||
anchor: error_reporting
|
||||
---
|
||||
|
||||
## Error Reporting {#error_reporting_title}
|
||||
|
||||
Error logging can be useful in finding the problem spots in your application, but it can also expose information about
|
||||
the structure of your application to the outside world. To effectively protect your application from issues that could
|
||||
Error logging can be useful in finding the problem spots in your application, but it can also expose information about
|
||||
the structure of your application to the outside world. To effectively protect your application from issues that could
|
||||
be caused by the output of these messages, you need to configure your server differently in development versus
|
||||
production (live).
|
||||
|
||||
@@ -21,12 +21,13 @@ error_reporting = -1
|
||||
log_errors = On
|
||||
{% endhighlight %}
|
||||
|
||||
> Passing in the value `-1` will show every possible error, even when new levels and constants are added in future PHP versions. The `E_ALL` constant also behaves this way as of PHP 5.4. - [php.net](http://php.net/function.error-reporting)
|
||||
> Passing in the value `-1` will show every possible error, even when new levels and constants are added in future PHP
|
||||
> versions. The `E_ALL` constant also behaves this way as of PHP 5.4. -
|
||||
> [php.net](http://php.net/function.error-reporting)
|
||||
|
||||
The `E_STRICT` error level constant was introduced in 5.3.0 and is not
|
||||
part of `E_ALL`, however it became part of `E_ALL` in 5.4.0. What does this mean?
|
||||
In terms of reporting every possible error in version 5.3 it means you must
|
||||
use either `-1` or `E_ALL | E_STRICT`.
|
||||
The `E_STRICT` error level constant was introduced in 5.3.0 and is not part of `E_ALL`, however it became part of
|
||||
`E_ALL` in 5.4.0. What does this mean? In terms of reporting every possible error in version 5.3 it means you must
|
||||
use either `-1` or `E_ALL | E_STRICT`.
|
||||
|
||||
**Reporting every possible error by PHP version**
|
||||
|
||||
@@ -45,7 +46,7 @@ error_reporting = E_ALL
|
||||
log_errors = On
|
||||
{% endhighlight %}
|
||||
|
||||
With these settings in production, errors will still be logged to the error logs for the web server, but will not be
|
||||
With these settings in production, errors will still be logged to the error logs for the web server, but will not be
|
||||
shown to the user. For more information on these settings, see the PHP manual:
|
||||
|
||||
* [error_reporting](http://php.net/errorfunc.configuration#ini.error-reporting)
|
||||
|
Reference in New Issue
Block a user