# CopernicaMarketingSoftware/PHP-CPP

Library to build PHP extensions with C++

Repository: https://github.com/CopernicaMarketingSoftware/PHP-CPP
Canonical: https://ross.abutalabs.com/products/php-cpp
Homepage: http://www.php-cpp.com/
Language: C++
License: Apache-2.0
License Family: permissive
Last push: 2026-07-06T11:07:33+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 80, longevity 100
- inputs: {"age_days": 4757, "days_push": 58, "days_rel": 58, "gap_med": 44.5, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1452, forks 336 (observed 2026-08-28T04:04:46.502045+00:00)

## What it is
PHP-CPP is a C++ library for building native PHP extensions without needing deep knowledge of the Zend engine internals. It uses C++11 features to automatically convert parameters and return values between PHP variables and native C++ types.

## Use cases
- write PHP extensions in C++
- speed up slow PHP algorithms with native code
- expose C++ functions and classes to PHP scripts
- avoid writing raw Zend engine C code
- build custom PHP classes with magic methods in C++
- create high-performance PHP libraries

## When to choose
- you need native performance for CPU-bound PHP workloads
- you want to write extensions in C++ instead of Zend C macros
- you want automatic type conversion between PHP and C++ values

## When to avoid
- you only need simple PHP scripting without native code
- you target PHP versions or platforms the library does not support
- you prefer FFI or other extension approaches like Zephir

## Facets
- artifact type: library
- maturity: stable
- function: sdk, developer-tools
- domain: developer-tools, programming-languages, performance
- platform: cpp, cross-platform
- tags: php, php-extensions, zend-engine, native-code, c++11, bindings, linux, macos

## Member repositories
- CopernicaMarketingSoftware/PHP-CPP (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:46.502045+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-30T04:35:46.671909+00:00, confidence not recorded.
  - readme: https://github.com/CopernicaMarketingSoftware/PHP-CPP (fetched 2026-08-28T04:04:46.502045+00:00, sha 9b7697e2e417)
  - homepage: http://www.php-cpp.com/ (fetched 2026-08-29T11:45:16.179992+00:00, sha 546571ccbea4)
  - site_page: https://www.php-cpp.com:443/documentation/ten-reasons-for-using-php-cpp (fetched 2026-08-29T11:45:16.183467+00:00, sha 5de6af6c3d65)
  - site_page: https://www.php-cpp.com:443/documentation (fetched 2026-08-29T11:45:16.186307+00:00, sha 4f3a8d86e179)
  - site_page: https://www.php-cpp.com:443/about (fetched 2026-08-29T11:45:16.188205+00:00, sha 73aa66e6702b)
  - site_page: https://www.php-cpp.com:443/documentation/bubblesort (fetched 2026-08-29T11:45:16.190264+00:00, sha 6351b2f07c1c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
