PHPackages                             cmaymard/php-code - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cmaymard/php-code

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cmaymard/php-code
=================

Provides support to mangle C++ names.

0.1.0(6y ago)05MITPHPPHP &gt;=7.3CI failing

Since Mar 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/christophemaymard/php-code)[ Packagist](https://packagist.org/packages/cmaymard/php-code)[ RSS](/packages/cmaymard-php-code/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

PhpCode
=======

[](#phpcode)

[![Latest Release](https://camo.githubusercontent.com/9b6dfd0595950c873ad4771fd6b250435854fb1f00329147571cfebecae2deda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636d61796d6172642f7068702d636f64653f6c6162656c3d52656c65617365267374796c653d706c6173746963)](https://packagist.org/packages/cmaymard/php-code)[![PHP Version](https://camo.githubusercontent.com/ee06b80911e64e801655aaee25d472999642d67f3c30a8571f2ad752ef85ce8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f636d61796d6172642f7068702d636f64653f636f6c6f723d696e666f726d6174696f6e616c266c6162656c3d504850267374796c653d706c6173746963)](https://www.php.net/)[![PHP Extensions](https://camo.githubusercontent.com/2140da40a3bc73fe5600f2d913e1b0d3743b3bae4fd6c806e512da843769b9fa/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850253230657874266d6573736167653d6d62737472696e6726636f6c6f723d696e666f726d6174696f6e616c267374796c653d706c6173746963)](https://www.php.net/)[![License](https://camo.githubusercontent.com/dce395f1c8f64eebd1a5a6de248125956880dd7937807c1db8c6aba4590ca03f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6368726973746f7068656d61796d6172642f7068702d636f64653f6c6162656c3d4c6963656e7365267374796c653d706c6173746963)](LICENSE)

PhpCode provides support to mangle C++ names.

Installation
------------

[](#installation)

```
composer require cmaymard/php-code

```

Examples
--------

[](#examples)

### Mangle C++ names (Itanium encoding)

[](#mangle-c-names-itanium-encoding)

```
use PhpCode\Language\Cpp\Mangling\ItaniumMangler;
use PhpCode\Language\Cpp\Specification\LanguageContextFactory;
use PhpCode\Language\Cpp\Specification\Standard;

$languageContextFactory = new LanguageContextFactory();
$languageContext = $languageContextFactory->create(Standard::CPP2017);
$mangler = new ItaniumMangler($languageContext);

// '_Z4mainv'
\var_dump($mangler->mangleFunction('main()'));

// '_Z4calcisjlfdi'
\var_dump($mangler->mangleFunction('calc(int, short, unsigned, long, float, double, signed)'));

// '_ZN9Framework7Logging6Logger3logEN3Log5ETypeEbcwz'
\var_dump($mangler->mangleFunction('Framework::Logging::Logger::log(Log::EType, bool, char, wchar_t, ...)'));
```

For more examples, read the [Mangle C++ names](doc/cpp/mangling.md) documentation.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2241d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12047223?v=4)[Christophe Maymard](/maintainers/ChristopheMaymard)[@christophemaymard](https://github.com/christophemaymard)

---

Top Contributors

[![christophemaymard](https://avatars.githubusercontent.com/u/12047223?v=4)](https://github.com/christophemaymard "christophemaymard (393 commits)")

---

Tags

codemanglingphpcodecppmangling

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cmaymard-php-code/health.svg)

```
[![Health](https://phpackages.com/badges/cmaymard-php-code/health.svg)](https://phpackages.com/packages/cmaymard-php-code)
```

###  Alternatives

[endroid/qr-code

Endroid QR Code

4.8k67.6M348](/packages/endroid-qr-code)[laminas/laminas-code

Extensions to the PHP Reflection API, static code scanning, and code generation

1.9k185.4M172](/packages/laminas-laminas-code)[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k64.2M576](/packages/nette-php-generator)[jetbrains/phpstorm-stubs

PHP runtime &amp; extensions header files for PhpStorm

1.4k27.7M68](/packages/jetbrains-phpstorm-stubs)[scrivo/highlight.php

Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js

71040.3M82](/packages/scrivo-highlightphp)[riimu/kit-phpencoder

Highly customizable alternative to var\_export for PHP code generation

717.8M32](/packages/riimu-kit-phpencoder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
