# TheAlgorithms/PHP

All Algorithms implemented in PHP

Repository: https://github.com/TheAlgorithms/PHP
Canonical: https://ross.abutalabs.com/products/thealgorithms-php
Language: PHP
License: MIT
License Family: permissive
Topics: php, data-structures, algorithms, hacktoberfest, algorithm
Last push: 2026-08-10T07:01:22+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 35, longevity 100
- inputs: {"age_days": 2251, "days_push": 23, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2646, forks 582 (observed 2026-08-28T04:07:06.756589+00:00)

## What it is
A collection of algorithms and data structures implemented in PHP for educational purposes. It serves as a reference for learning how common computational algorithms work rather than a production-grade library.

## Use cases
- learn how sorting algorithms are implemented in php
- study data structures like trees and graphs in php
- reference implementations of common algorithms for education
- prepare for coding interviews with php algorithm examples
- understand algorithm pseudocode by reading php code

## When to choose
- you want readable, educational implementations of algorithms in php
- you are learning algorithms and prefer php as your language
- you need reference code to compare against your own implementations

## When to avoid
- you need performant, production-ready algorithms - use php's standard library instead
- you need a maintained, tested algorithm library for a real application
- you need algorithms in a language other than php

## Facets
- artifact type: learning-resource
- maturity: active
- function: developer-tools
- domain: education, programming-languages
- platform: php
- tags: algorithms, data-structures, educational, php

## Member repositories
- TheAlgorithms/PHP (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:06.756589+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:18:58.127862+00:00, confidence not recorded.
  - readme: https://github.com/TheAlgorithms/PHP (fetched 2026-08-28T04:07:06.756589+00:00, sha 39967ea0e1d8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
