# zephir-lang/zephir

Zephir is a compiled high-level language aimed to ease the creation of C-extensions for PHP

Repository: https://github.com/zephir-lang/zephir
Canonical: https://ross.abutalabs.com/products/zephir
Homepage: https://zephir-lang.com
Language: PHP
License: MIT
License Family: permissive
Topics: zephir, phalcon, php-internals, php-extension, php, php-extensions, skeleton, c, hacktoberfest
Last push: 2026-08-26T18:27:53+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 4795, "days_push": 7, "days_rel": 8, "gap_med": 13.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3386, forks 462 (observed 2026-08-28T04:07:58.752015+00:00)

## What it is
Zephir is a high-level, statically/dynamically typed programming language with a compiler CLI that transpiles code to C for building PHP extensions. It offers memory safety without pointers and compiles via gcc, clang, or Visual C++ into loadable PHP shared libraries.

## Use cases
- write php extensions in a high level language
- compile php code to c extension
- speed up php framework with native extension
- create php extension without learning c
- build phalcon-style php extension
- generate c code from php-like syntax

## When to choose
- you want to write fast PHP extensions without hand-writing C
- you maintain or extend Phalcon or similar extension-based frameworks
- you want type and memory safety while targeting PHP internals

## When to avoid
- you need a general-purpose language outside the PHP extension ecosystem
- you require direct pointer-level control or C interop beyond PHP APIs
- your project is pure PHP with no performance-critical hot paths

## Facets
- artifact type: cli-tool
- maturity: active
- function: compiler, programming-language, developer-tools
- domain: programming-languages, compilers, developer-tools, web-development
- platform: windows, php, cli, cross-platform
- tags: php-extensions, c-extensions, php-internals, static-typing, memory-safety, phalcon, linux, macos

## Member repositories
- zephir-lang/zephir (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:58.752015+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-29T18:39:27.924084+00:00, confidence not recorded.
  - readme: https://github.com/zephir-lang/zephir (fetched 2026-08-28T04:07:58.752015+00:00, sha 89fe6b5409a6)
  - homepage: https://zephir-lang.com (fetched 2026-08-29T09:33:12.973112+00:00, sha 7b179cc4a54e)
  - site_page: https://docs.zephir-lang.com/ (fetched 2026-08-29T09:33:12.982009+00:00, sha f0aaddac7f8c)
  - site_page: https://docs.zephir-lang.com/latest/installation (fetched 2026-08-29T09:33:12.983642+00:00, sha 0b12c67064d3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
