PHPackages                             drop-in-gaming/carbonphp - 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. [Framework](/categories/framework)
4. /
5. drop-in-gaming/carbonphp

ActiveLibrary[Framework](/categories/framework)

drop-in-gaming/carbonphp
========================

A PHP 8.1+ tool kit featuring RESTFUL ORM, sockets, session management, and routing.

1.1.3(2y ago)03191MITPHPPHP &gt;=8.2

Since Sep 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Drop-In-Gaming/CarbonPHP)[ Packagist](https://packagist.org/packages/drop-in-gaming/carbonphp)[ Docs](https://github.com/Drop-In-Gaming/CarbonPHP)[ RSS](/packages/drop-in-gaming-carbonphp/feed)WikiDiscussions lts Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (6)Used By (1)

[![PHP Version](https://camo.githubusercontent.com/6c749d0b23252841dd1fc43688053cb1fb2af061fdf9eadc85353250d1e56375/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f636172626f6e6f726d2f636172626f6e706870)](https://camo.githubusercontent.com/6c749d0b23252841dd1fc43688053cb1fb2af061fdf9eadc85353250d1e56375/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f636172626f6e6f726d2f636172626f6e706870)[![GitHub Release](https://camo.githubusercontent.com/bb73d01024f780cc8ff6a04031eeaef8f31acdde8aa7d5d7432942d241b25bcc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f636172626f6e6f726d2f636172626f6e706870)](https://camo.githubusercontent.com/bb73d01024f780cc8ff6a04031eeaef8f31acdde8aa7d5d7432942d241b25bcc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f636172626f6e6f726d2f636172626f6e706870)[![Packagist Version](https://camo.githubusercontent.com/488e11a18d5d57c4a12d9f3fb0a49b8f2a7365f43805bba302fc1e9387a1b7ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636172626f6e6f726d2f636172626f6e706870)](https://camo.githubusercontent.com/488e11a18d5d57c4a12d9f3fb0a49b8f2a7365f43805bba302fc1e9387a1b7ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636172626f6e6f726d2f636172626f6e706870)[![License](https://camo.githubusercontent.com/49b7ddaa3aee73dab30106f9c6b09dc0e74056474369af3a1271fbdd7ec8b5b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636172626f6e6f726d2f636172626f6e706870)](https://camo.githubusercontent.com/49b7ddaa3aee73dab30106f9c6b09dc0e74056474369af3a1271fbdd7ec8b5b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636172626f6e6f726d2f636172626f6e706870)[![Size](https://camo.githubusercontent.com/5db28e7f5f5ae184f7aff94f373b37920e3e21c28710d06fbaaedc377a317707/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f636172626f6e6f726d2f636172626f6e706870)](https://camo.githubusercontent.com/5db28e7f5f5ae184f7aff94f373b37920e3e21c28710d06fbaaedc377a317707/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f636172626f6e6f726d2f636172626f6e706870)[![Documentation](https://camo.githubusercontent.com/f96cfec051f4dfbfa8183e5e18af92047b30dfffe4df0ec8c1fb86dcf25e9dbc/68747470733a2f2f696d672e736869656c64732e696f2f776562736974653f646f776e5f636f6c6f723d6c696768746772657926646f776e5f6d6573736167653d4f66666c696e652675705f636f6c6f723d677265656e2675705f6d6573736167653d4f6e6c696e652675726c3d6874747073253341253246253246636172626f6e7068702e636f6d)](https://camo.githubusercontent.com/f96cfec051f4dfbfa8183e5e18af92047b30dfffe4df0ec8c1fb86dcf25e9dbc/68747470733a2f2f696d672e736869656c64732e696f2f776562736974653f646f776e5f636f6c6f723d6c696768746772657926646f776e5f6d6573736167653d4f66666c696e652675705f636f6c6f723d677265656e2675705f6d6573736167653d4f6e6c696e652675726c3d6874747073253341253246253246636172626f6e7068702e636f6d)[![CarbonPHP Feature Test Suit](https://github.com/carbonorm/CarbonPHP/workflows/CarbonPHP%20Feature%20Test%20Suit/badge.svg)](https://github.com/carbonorm/CarbonPHP/workflows/CarbonPHP%20Feature%20Test%20Suit/badge.svg)[![Monthly Downloads](https://camo.githubusercontent.com/ca4d842ea86f49c76bef2acc63fce9cbccbd5a9c7629f1eef3f0220c742469db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f72696368617264746d696c65732f636172626f6e706870)](https://camo.githubusercontent.com/ca4d842ea86f49c76bef2acc63fce9cbccbd5a9c7629f1eef3f0220c742469db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f72696368617264746d696c65732f636172626f6e706870)[![Monthly Downloads](https://camo.githubusercontent.com/a1ea5ec663d9f59da6b78a783959c0ad57b28ce6b3e195c9fd0eec8b541d724e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f636172626f6e6f726d2f636172626f6e706870)](https://camo.githubusercontent.com/a1ea5ec663d9f59da6b78a783959c0ad57b28ce6b3e195c9fd0eec8b541d724e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f636172626f6e6f726d2f636172626f6e706870)[![All Downloads](https://camo.githubusercontent.com/ff5e8015a44eb22d6eb8c98ffb5ffabbe80fe5280661a309ffc46c9edf806ee6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72696368617264746d696c65732f636172626f6e706870)](https://camo.githubusercontent.com/ff5e8015a44eb22d6eb8c98ffb5ffabbe80fe5280661a309ffc46c9edf806ee6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72696368617264746d696c65732f636172626f6e706870)[![All Downloads](https://camo.githubusercontent.com/6fd0f06c704b49eeb63234d5bb8a66df504c6d0b2d121ed38396ebb011d461f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636172626f6e6f726d2f636172626f6e706870)](https://camo.githubusercontent.com/6fd0f06c704b49eeb63234d5bb8a66df504c6d0b2d121ed38396ebb011d461f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636172626f6e6f726d2f636172626f6e706870)[![Star](https://camo.githubusercontent.com/ab4dfe567225673e7ba41df91530af4126956677f56f87f0b8d0774364378544/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f636172626f6e6f726d2f636172626f6e7068703f7374796c653d736f6369616c)](https://camo.githubusercontent.com/ab4dfe567225673e7ba41df91530af4126956677f56f87f0b8d0774364378544/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f636172626f6e6f726d2f636172626f6e7068703f7374796c653d736f6369616c)

UPDATE - Repository location change
===================================

[](#update---repository-location-change)

Some badges above are duplicated to show the true stats across [Packagist](https://packagist.org/?query=%2Fcarbonphp).

New installation
----------------

[](#new-installation)

`composer require carbonorm/carbonphp`

Note - the old location `composer require richardtmiles/carbonphp` should continue to work but is considered deprecated

CarbonPHP Tool Kit and Performance Library
==========================================

[](#carbonphp-tool-kit-and-performance-library)

CarbonPHP has grown into the [CarbonORM Public Organization](https://github.com/CarbonORM/). There you can find documentation over the front end process of using the ORM. C6 now refers to any of Carbon\* prefixed CarbonORM packages.

[CarbonPHP.com](http://carbonphp.com/)

CarbonPHP has reached a stable level of trust in its own features through PHPUnit Tests + GitHub Actions but is still in active development. CarbonPHP is being used in production environments. Anyone, or team, who attempts using this code will find support on GitHub through issues and forums. We generally expect any issue you many encountered to be minor. If you edit the codebase, please consider submitting those changes on GitHub! C6 uses [Semantic Versioning 2.0.0](https://semver.org). Generally: MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards compatible manner, and PATCH version when you make backwards compatible bug fixes. Changes to function/class/etc will be called out in the Changelog with every minor release. Please read the changelog or code changes carefully when updating. Refer to the guide at [carbonphp.com](https://carbonphp.com)

Introduction - The ORM of your dreams &amp; Wordpress Compatable
----------------------------------------------------------------

[](#introduction---the-orm-of-your-dreams--wordpress-compatable)

CarbonPHP is a PHP 7.4+ library to simplify the building of custom, dynamic web applications. Its main focus is to make webapps run ridiculously fast, with performance and high-traffic scalability being the absolute highest concern. CarbonPHP has clocked in with impressive statistics, sometimes doubling the traffic that small servers with MySQL-intensive sites can handle. C6 works as a standalone backbone for your dev needs or in the corporation with other popular frameworks like [Wordpress](https://developer.wordpress.org)or [Laravel](https://laravel.com). CarbonPHP's other goals include portability; allowing your webapps to be installed on servers with different operating systems (Windows, Mac, and Linux Support). Full MySQL ORM REST generator, and php written database tools designed around the MySQL. Windows PHP currently lacks a library capable of forking. Should your development require Windows computers look into [Websocketd.com](Websocketd.com) and the file name "./programs/Websocketd.php". I have written a few wiki's in the repo above explaining how to Use sockets in this way. I hope to contribute a php library written in C (PHP is written in C) to support this task, however time is a factor. Should you feel compelled to help in this goal please contact me at . Please see the documentation at Carbonphp.com for more information. For the rest of us who live outside windows Hell C6 has a Websocket Library Class for Standard use and Wordpress use.

Quick Start
-----------

[](#quick-start)

### Existing projects

[](#existing-projects)

```
composer require carbonorm/carbonphp

```

Standards
---------

[](#standards)

C6 should follow the [PHP Standards Recommendations](https://www.php-fig.org/psr/) listed below.

[PSR-4](https://www.php-fig.org/psr/psr-4/)

[PSR-12](https://www.php-fig.org/psr/psr-12/)

[SEMVAR](https://semver.org)

Requirements
------------

[](#requirements)

CarbonPHP currently requires PHP 8.2 or later. We try to stay up-to-date with [PHP's Supported Versions](https://www.php.net/supported-versions.php). It makes use of return type object notation, and should not be ported back to earlier PHP versions. CarbonPHP will always try to stay upto date with the latest version of PHP. Use of an opcode cache such as XCache is highly recommended, as Carbon is able to run entirely without stat() calls when paired with an opcode cache. Also recommended (but optional) is a RAM-caching engine such as memcached. PHP8, if not already supported, will receive support WITH C6's FIRST Backwards Compatible Release. Plans to drop 7.4 are currently scheduled for the summer of 2022.

Documentation
-------------

[](#documentation)

All function should have PHPDoc-style documentation in the code. [CarbonPHP.com](https://carbonphp.com/) also has full explanations of the codebase. ssed to MVC. Please ensure your namespace mappings are correct!";

### RESTFUL ORM

[](#restful-orm)

CarbonPHP's largest feature is the MySQL ORM. By running a customizable CLI command our program will analyze your database schema and generate powerful classes used to manipulate your tables. The auto generated files may be used in conjunction for an incredibly pleasing RESTFUL semantics structure. Below are examples for using the REST ORM. You can [see the generated source here](https://github.com/RichardTMiles/CarbonPHP/blob/master/carbonphp/tables/Carbon_Users.php).

```
    $id = Users::Post([
            Users::USER_TYPE => 'Athlete',
            Users::USER_IP => '127.0.0.1',
            Users::USER_SPORT => 'GOLF',
            Users::USER_EMAIL_CONFIRMED => 1,
            Users::USER_USERNAME => Config::ADMIN_USERNAME,
            Users::USER_PASSWORD => Config::ADMIN_PASSWORD,
            Users::USER_EMAIL => 'richard@miles.systems',
            Users::USER_FIRST_NAME => 'Richard',
            Users::USER_LAST_NAME => 'Miles',
            Users::USER_GENDER => 'Male'
        ]);
```

Joining across multiple tables.

```
    Users::Get($user, $uid, [
            Users::SELECT => [
                Users::USER_USERNAME,
                Carbon_Locations::STATE
            ],
            Users::JOIN => [
                Users::INNER => [
                    Carbon_Location_References::TABLE_NAME => [
                        Users::USER_ID => Carbon_Location_References::ENTITY_REFERENCE
                    ],
                    Carbon_Locations::TABLE_NAME => [
                        Carbon_Locations::ENTITY_ID => Carbon_Location_References::LOCATION_REFERENCE
                    ]
                ]
            ],
            Users::PAGINATION => [
                Users::LIMIT => 1,
                Users::ORDER => [Users::USER_USERNAME => Users::ASC]
            ]
        ]);
```

Using the ORM from the Frontend. This example showcases multiple table joins, as well as the use of aggregate function(s) GROUP\_CONCAT.

```
    const { axios } = this.props;

    axios.get('/rest/' + C6.carbon_users.TABLE_NAME, {
      params: {
        [C6.SELECT]: [
          C6.carbon_users.USER_USERNAME,
          C6.carbon_users.USER_FIRST_NAME,
          C6.carbon_users.USER_LAST_NAME,
          C6.carbon_users.USER_ID,
          [C6.GROUP_CONCAT, C6.carbon_features.FEATURE_CODE],
          [C6.GROUP_CONCAT, C6.carbon_groups.GROUP_NAME]
        ],
        [C6.JOIN]: {
          [C6.LEFT]: {
            [C6.carbon_user_groups.TABLE_NAME]: [
              C6.carbon_users.USER_ID,
              C6.carbon_user_groups.USER_ID
            ],
            [C6.carbon_groups.TABLE_NAME]: [
              C6.carbon_user_groups.GROUP_ID,
              C6.carbon_groups.ENTITY_ID
            ],
            [C6.carbon_feature_group_references.TABLE_NAME]: [
              C6.carbon_groups.ENTITY_ID,
              C6.carbon_feature_group_references.GROUP_ENTITY_ID
            ],
            [C6.carbon_features.TABLE_NAME]: [
              C6.carbon_features.FEATURE_ENTITY_ID,
              C6.carbon_feature_group_references.FEATURE_ENTITY_ID
            ]
          }
        },
        [C6.PAGINATION]: {
          [C6.LIMIT]: 100
        }
      }
    }).then(response => this.setState({ users: (response.data.rest || []) }));
```

Builtin Command Line Interface
==============================

[](#builtin-command-line-interface)

Much like laravel's artisan, any file that invokes CarbonPHP from the command line will execute the CLI Interface. I plan to make a system in place for user commands in Beta. See all available commands with:

```
php index.php help

```

Support
-------

[](#support)

Informal support for CarbonPHP is currently offered on .

Legal
-----

[](#legal)

Use of CarbonPHP implies agreement with its software license, available in the LICENSE file. This license is subject to change from release to release, so before upgrading to a new version of C6, please review its license.

Credits
-------

[](#credits)

CarbonPHP was created by Richard Tyler Miles, the BDFL, and inspired by [Tom Frost's](https://github.com/TomFrost) [Hydrogen](https://github.com/TomFrost/Hydrogen).

Contributors can be found in the GitHub Contributor Listing.

NOTES
-----

[](#notes)

### Common TSX types

[](#common-tsx-types)

```
something: PropTypes.arrayOf(PropTypes.node)
****classes: PropTypes.object.isRequired,
message: PropTypes.node.isRequired,

```

To update the version number on the FED

1. update the header menu

    view/assets/react/src/components/HeaderTop/HeaderLinks.tsx components/HeaderTop/HeaderLinks.tsx
2. version number

    variables/carbonphp.jsx

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% 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

Every ~6 days

Total

5

Last Release

930d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2864f7f768564696376b54778a400f0a0e69b7dbcfe3a4ec7f6b68e7e8d77127?d=identicon)[seanhurley170](/maintainers/seanhurley170)

---

Top Contributors

[![RichardTMiles](https://avatars.githubusercontent.com/u/9538357?v=4)](https://github.com/RichardTMiles "RichardTMiles (1162 commits)")[![seanhurley170](https://avatars.githubusercontent.com/u/74028583?v=4)](https://github.com/seanhurley170 "seanhurley170 (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![georgeraheb](https://avatars.githubusercontent.com/u/44784543?v=4)](https://github.com/georgeraheb "georgeraheb (1 commits)")[![nicoledodge](https://avatars.githubusercontent.com/u/76898813?v=4)](https://github.com/nicoledodge "nicoledodge (1 commits)")

---

Tags

socketsroutingiocarbonsessionpipes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/drop-in-gaming-carbonphp/health.svg)

```
[![Health](https://phpackages.com/badges/drop-in-gaming-carbonphp/health.svg)](https://phpackages.com/packages/drop-in-gaming-carbonphp)
```

###  Alternatives

[richardtmiles/carbonphp

A PHP 8.1+ tool kit featuring RESTFUL ORM, sockets, session management, and routing.

1110.2k](/packages/richardtmiles-carbonphp)[klein/klein

A lightning fast router for PHP

2.7k1.1M31](/packages/klein-klein)[nette/application

🏆 Nette Application: a full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will bring you joy.

44615.4M983](/packages/nette-application)[yiisoft/yii2-redis

Redis Cache, Session and ActiveRecord for the Yii framework

48011.7M244](/packages/yiisoft-yii2-redis)[laravel/folio

Page based routing for Laravel.

608453.9k27](/packages/laravel-folio)[pecee/simple-router

Simple, fast PHP router that is easy to get integrated and in almost any project. Heavily inspired by the Laravel router.

696214.6k17](/packages/pecee-simple-router)

PHPackages © 2026

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