Skip to content

Instantly share code, notes, and snippets.

@beyondlimits
Last active July 27, 2019 19:12
Show Gist options
  • Save beyondlimits/2a2328a889e038569fa1982f8bca94ff to your computer and use it in GitHub Desktop.
Save beyondlimits/2a2328a889e038569fa1982f8bca94ff to your computer and use it in GitHub Desktop.
Development PHP configuration
memory_limit = 1G
error_reporting = E_ALL
display_errors = stderr
display_startup_errors = On
auto_prepend_file = strict-error-handling.php
include_path = "/usr/share/php"
sqlite3.defensive = 1
zend.assertions = 1
assert.active = On
assert.exception = On
<?php
# Place it in /usr/share/php
function error($n, $s, $f, $l) {
if (!error_reporting()) {
return false;
}
throw new ErrorException($s, $n, E_ERROR, $f, $l);
}
set_error_handler('error', E_ALL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment