php-version

php-version is a cursor rule for Cursor from dalehurley/codewithphp. It costs 217 tokens per session, scanned A, original, MIT.

A project rule requiring all examples and tutorials to use PHP 8.4. PHP is a programming language commonly used to build websites and server-side applications.

In plain words
What is it for?
Use it when writing PHP examples, tutorials, prerequisites, or Composer package settings. It also points authors toward PHP 8.4 features and documentation.
Why use it?
It keeps the code and documentation consistent with one PHP version. This reduces confusion about which language features and dependency requirements readers should use.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when writing PHP examples, tutorials, prerequisites, or Composer package settings. It also points authors toward PHP 8.4 features and documentation.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/dalehurley/codewithphp/php-version
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.

Clone the repo
git clone --depth 1 https://github.com/dalehurley/codewithphp

Made for: Cursor.

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-version

README.md
[![agentmods](https://agentmods.dev/badge/rules/dalehurley/codewithphp/php-version/github.svg)](https://agentmods.dev/rules/dalehurley/codewithphp/php-version)
Your own site
<a href="https://agentmods.dev/rules/dalehurley/codewithphp/php-version"><img src="https://agentmods.dev/badge/rules/dalehurley/codewithphp/php-version/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for php-version

Your own site · 80×15
<a href="https://agentmods.dev/rules/dalehurley/codewithphp/php-version"><img src="https://agentmods.dev/badge/rules/dalehurley/codewithphp/php-version.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 217 This file is loaded in full into every session.
When invoked 217 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00217 $0.00217
Opus 5.5 $0.00087 $0.00087
Sonnet 5.5 $0.00043 $0.00043
Haiku 4.5 $0.00022 $0.00022

Measured 9d ago against content hash d1bffcbeb10d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

php-version 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 9d 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.

.cursor/rules/php-version.mdc · 31 lines

What it actually says

PHP Version Requirement

This project uses PHP 8.6 exclusively.

Code Requirements

  • All PHP code examples, snippets, and tutorials must be compatible with PHP 8.6
  • Use PHP 8.6 syntax and features where appropriate
  • When showing version-specific features, specify PHP 8.6 compatibility
  • Include php: "^8.6" in any composer.json files or dependency requirements

Documentation

  • Reference PHP 8.6 documentation: https://www.php.net/releases/8.6/en.php
  • When mentioning PHP versions in tutorials, default to 8.6 unless specifically comparing versions
  • Prerequisites sections should specify PHP 8.6 as the required version

Code Examples

  • Use modern PHP 8.6 features including:
    • Property hooks
    • Asymmetric visibility
    • New array functions
    • #[\Override] attribute
    • Type system improvements
    • And other PHP 8.6 capabilities where relevant
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. 9d ago Changed · +2 tokens per session d1bffcbeb10d
  2. 3mo ago First seen · 31 lines · 215 tokens per session scan A 4ca1290cc56b

Subscribe to this mod's changes

php-version is a cursor rule published in the GitHub repository dalehurley/codewithphp (6 stars, last pushed 7d ago), licensed MIT. It adds 217 tokens to every session, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

php-version compared with cursor rules from other repositories

php-version next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
php-versiondalehurley/codewithphpCursor rule67d agoMITA217Cursor
moodle-upgrade-migrationSaadRahman01/claude-moodle-devCursor rule435mo agoMITA0Cursor
laravelsanjeed5/awesome-cursor-rules-mdcCursor rule3.6k7d agoCC0-1.0A2,628Cursor
laravel-package-coding-standardsholtwood/awesome-cursorrules-zhCursor rule2441mo agoMITA0Cursor
bundlingbubblelabai/BubbleLabCursor rule1.1k7mo agoApache-2.0A1,505Cursor
backendshopsys/shopsysCursor rule349todaynoneA0Cursor
react-vite-tanstackunoplat/unoplat-code-confluenceCursor rule9325d agononeA631Cursor