php-environment-check

php-environment-check is a skill for Claude Code, Codex from symfony/ai-mate. It costs 82 tokens per session (534 once invoked), scanned A, a copy of mate-php-environment-check, MIT.

A PHP runtime diagnostic that reports the PHP version, operating system, and loaded extensions. PHP extensions are optional components that add capabilities to the runtime.

In plain words
What is it for?
Use it when a tool fails unexpectedly or a feature is missing, especially when checking extensions such as SimpleXML needed to read Symfony container data.
Why use it?
It helps distinguish a missing or incompatible PHP runtime component from a problem in the application or its configuration.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/symfony/ai-mate/php-environment-check
Any agent
npx skills add symfony/ai-mate --skill php-environment-check
Clone the repo
git clone --depth 1 https://github.com/symfony/ai-mate

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for php-environment-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/symfony/ai-mate/php-environment-check.svg)](https://agentmods.dev/skills/symfony/ai-mate/php-environment-check)
Your own site
<a href="https://agentmods.dev/skills/symfony/ai-mate/php-environment-check"><img src="https://agentmods.dev/badge/skills/symfony/ai-mate/php-environment-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00082 $0.00534
Opus 5 $0.00041 $0.00267
Sonnet 5 $0.00016 $0.00107
Haiku 4.5 $0.00008 $0.00053

Measured 4d ago against content hash 2bb5dbeee5e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

php-environment-check scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to mate-php-environment-check — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/php-environment-check/SKILL.md · 26 lines

How it starts

The opening of the file, as written. The whole thing — 26 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PHP environment check

server-info takes no arguments and returns php_version, operating_system, operating_system_family, and extensions (the extensions loaded for this runtime). Calling it is trivial; the judgment is knowing when a failure is the runtime, not the code, and reading the result against what a feature needs.

server-info accepts --format: json to parse the result, toon (when helgesverre/toon is installed) for the smallest context footprint. The loaded-extension list is long, so pass --format=json when you only need to test for one extension.

When to reach for it

Reach for server-info when a Mate tool fails or behaves oddly while the application under inspection looks fine. That gap usually means the runtime running Mate, not the app.

  • Container inspection returns nothing or errors. symfony-services / symfony-service-detail parse the dumped container XML with SimpleXML. If simplexml is absent from extensions, that parse fails and the service map comes back empty regardless of the app. Check for simplexml before assuming the container was never compiled.
  • Mate itself refuses to run or a feature is missing. Mate requires PHP >= 8.2. Read php_version before blaming config; an old CLI PHP on the box is a common cause.
  • Path or behavior differs from expectation. operating_system_family (Windows vs Linux/Darwin) explains divergent path handling or line endings.

Reading

  • extensions is the loaded list for this SAPI, not the installed-but-disabled list. Absent means not loaded for the runtime Mate is using, which is enough on its own to explain a dependent tool failing.
  • The PHP running the Mate CLI may differ from the one serving the app (different SAPI, different version). server-info reports the CLI runtime, so a mismatch here versus what the app runs is itself a finding.

Do not use this to diagnose application behavior. It answers one question: is the environment the reason a tool did not work.

Read the full file on GitHub · 26 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 26 lines · 82 tokens per session scan A 2bb5dbeee5e4

Subscribe to this mod's changes

php-environment-check is a skill published in the GitHub repository symfony/ai-mate (33 stars, last pushed 5d ago), licensed MIT. It adds 82 tokens to every session and 534 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to mate-php-environment-check, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

mate-system-information

Resolve which dependency versions are actually installed, from composer show and composer.lock, when diagnosing version-specific behavior such as a method, argument or class that does not exist in the release that is really running. For the PHP runtime itself (version, OS, loaded extensions) use the…

symfony/ai-demo · 66 tokens

mate-php-environment-check

Check the PHP runtime with server-info, its version, OS, and loaded extensions. Reach for it when a Mate tool itself fails or a capability is missing and you suspect the environment, a missing extension or an old PHP, rather than the app or its config. Not for diagnosing app behavior (profiler, log investigation) or…

symfony/ai-demo · 84 tokens

pennant-development

Use when working with Laravel Pennant the official Laravel feature flag package. Trigger whenever the query mentions Pennant by name or involves feature flags or feature toggles in a Laravel project. Tasks include defining feature flags checking whether features are active creating class based features in app/Features…

laravel/boost · 124 tokens

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…

laravel/boost · 114 tokens

examples-qa

Verify Instructor behavior through the repository's ./examples/ suite in pass, live record, or hermetic replay mode. Use when running selected examples or the corpus, capturing and reusing recorded LLM HTTP responses, diagnosing hub results, or distinguishing real errors, assertion failures, skipped examples, and…

cognesy/instructor-php · 67 tokens

instructor-release

Prepare and execute a new InstructorPHP version release. Use when asked to cut a release, prepare release notes, run release QA, create a release epic and tasks in bd, verify changed packages since the last tag, run curated live examples, publish via scripts/release/publish-ver.sh, or prepare the launch announcement.

cognesy/instructor-php · 68 tokens