Developer tool
PHP Error Reporting Generator
Build error_reporting, display_errors, and log_errors snippets for development and production.
How it works
What it does
This generator produces error_reporting, display_errors, and log_errors configuration snippets from development, production, or custom flag selections. It speaks in real E_* constants so you can paste into PHP or ini files with confidence.
When to use it
- Aligning local verbose errors with silent production logging
- Building a custom mask that includes deprecations during upgrades
- Documenting the exact bitmask your team standardizes on
How input is processed safely
Selections become text snippets only. The tool does not change this server’s error settings for other sites and does not execute sample code that triggers errors. Production guidance discourages displaying errors to end users.
Examples
- Development: wide reporting + display on + logging on
- Production: wide reporting + display off + logging on
- Custom: include
E_DEPRECATEDwhile excluding noisy notices temporarily
Common mistakes
- Using
E_ALL & ~E_NOTICEforever and missing real problems - Leaving
display_errors=Onin production - Assuming
@operator “fixes” underlying issues
Good error configuration is an operations practice. Development should be loud; production should be quiet to clients and complete in logs. During upgrades, temporarily elevating deprecation visibility in staging is often more valuable than hiding notices forever.
Custom flag matrices are powerful but easy to get wrong. Prefer named presets first, then customize. Document the final bitmask in your runbook so new environments do not invent incompatible settings.
Remember that libraries may call error_reporting() at runtime. If logs disagree with ini values, search bootstrap code for overrides and for error handlers that swallow events.
Practical tips
- Keep inputs small and representative; huge pastes slow feedback and raise risk of accidental secret disclosure.
- After using PHP Error Reporting Generator, verify the result in your own environment (correct SAPI, correct host, correct project root).
- Cross-link findings to ZendStudio.net PHP error guides and IDE setup pages when the next step is configuration rather than code edits.
- Prefer repeatable project tooling (CI, Composer scripts, IDE inspections) for repo-wide enforcement; this page is for interactive problem-solving.
Privacy note
Displayed errors can leak paths and SQL. Prefer logs in production and keep log access restricted.
Run in browser
AJAX processing only. No remote PHP execution sandbox. Results are not indexed.
Safety notes
- Submitted tool contents are not written to analytics or search logs.
- This site never evaluates arbitrary PHP from the browser.
- Generated configs are starting points—validate on a staging host before production.