Developer tool

PHP Environment Compare

Compare two PHP environment summaries to find directive and extension mismatches.

How it works

What it does

PHP Environment Compare accepts two sanitized environment summaries—selected directives, loaded extension lists, or compact php -i style excerpts—and reports meaningful differences. It targets the classic “works locally but not in production” gap analysis.

When to use it

  • Extension missing in production (ext-intl, ext-gd, etc.)
  • Timezone, memory, or upload directive drift
  • CLI vs FPM mismatch investigations

How input is processed safely

Paste minimal summaries, not entire production phpinfo HTML. The tool parses text fields only; it does not connect with your credentials, does not scrape URLs, and does not execute PHP from the paste. Warnings discourage secret-laden dumps.

Examples

  • Local has intl, production does not
  • display_errors differs across SAPIs
  • OPcache enabled only in FPM

Common mistakes

  • Pasting complete phpinfo with environment variables and paths
  • Comparing different PHP major versions without noting that fact
  • Ignoring that Apache/mod_php and FPM read different ini files

Environment compare shines when you feed it curated lists: extension names, a dozen critical directives, and SAPI labels. That beats dumping megabytes of phpinfo HTML that includes transient noise and secrets.

Typical high-signal differences include missing extensions, divergent timezone/locale, memory/upload limits, OPcache enablement, and Zend/extension debug builds. Capture those deliberately from both sides using the same method.

After you find a delta, change one variable at a time in staging. Confirm the application symptom disappears before you declare victory, and record the final baseline for the next incident.

Practical tips

  • Keep inputs small and representative; huge pastes slow feedback and raise risk of accidental secret disclosure.
  • After using PHP Environment Compare, 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

Do not paste a complete production phpinfo() dump. Strip environment variables, document roots, and credentials. Prefer php -i filtered sections or explicit directive lists.

Run in browser

AJAX processing only. No remote PHP execution sandbox. Results are not indexed.

Remove secrets before pasting. Max ~200KB per side.

Inputs are processed for this request only and are not stored in analytics. Object unserialize and arbitrary PHP execution are blocked.

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.