PHPackages                             aa-ahmed-aa/dorm - 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. [CLI &amp; Console](/categories/cli)
4. /
5. aa-ahmed-aa/dorm

ActivePackage[CLI &amp; Console](/categories/cli)

aa-ahmed-aa/dorm
================

This is a compiler package for compiling and running c and cpp files this package is designed to can add any other compilers later.

v1.4(6y ago)4243[1 PRs](https://github.com/aa-ahmed-aa/Dorm/pulls)MITPHPPHP &gt;=7.1CI failing

Since Apr 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/aa-ahmed-aa/Dorm)[ Packagist](https://packagist.org/packages/aa-ahmed-aa/dorm)[ RSS](/packages/aa-ahmed-aa-dorm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

Dorm
====

[](#dorm)

This is a package for running and compiling your c and c++ files add the compiler to the configurations file and you are ready to go 💥 .

Run TestCases &amp; Coverage
----------------------------

[](#run-testcases--coverage)

- Test cases `composer run-script test`.
- Code Cvoverage `composer run-script coverage`.

🍯 Install
---------

[](#honey_pot-install)

You can install the package using `composer require aa-ahmed-aa/dorm`

🔨 Configuration
---------------

[](#hammer-configuration)

First you need to install compilers and configure their paths in `src/Core/Config.php`

#### C++

[](#c)

- you can find the MinGW compiler [Here](https://nuwen.net/mingw.html)
- after you download the compiler files copy the `MinGW` folder to your `C://` drive

#### Java

[](#java)

- install jdk and configure the path in your environment variables you can find the judk [Here](http://www.oracle.com/technetwork/java/javase/downloads/index.html)

#### Python

[](#python)

- install python from [Here](https://www.python.org/downloads/)
- if you want this package to handle both versions of `python2.x` and `python3.x` the package already do this and you can look at [This Question](https://stackoverflow.com/a/4621277/5701752) to cnfigure both of them on the command line

🔦 Usage
-------

[](#flashlight-usage)

First you need to `setCompilationPath` in this path the package will create files of the code and compile and run your code
so let's compile and run your first cpp code

```
require ('vendor/autoload.php');
use Ahmedkhd\Dorm\Dorm;

$obj = new Executor('cpp');

//set compilation path
$obj->setCompilationPath( __DIR__ );
echo $obj->getCompilationPath();
```

Now lets compile and run some real code

#### C++

[](#c-1)

here we compile and run c++ code and print the result

```
$cpp_code = run() : "Fail" ) . "\n";
```

#### Java

[](#java-1)

```
//java
$java_code = compile($java_code);
echo "Compilation : " . ( ! is_array($comp) ? "Success" : "Fail" )  . "\n";
echo "Running is : " . ( ! is_array($comp) ? $obj->run() : "Fail" ) . "\n";
```

#### Python

[](#python-1)

```
$python_code = compile( $python_code);
echo "Running : " . implode( $comp )  . "\n";
```

🔌 Add your compiler
-------------------

[](#electric_plug-add-your-compiler)

You can check this [blog post](https://dev.to/aaahmedaa/dorm-introducing-multi-compiler-package--for-php-15m6) for more information.

This package is designed to handle compile/run of any other compilers in your project

```
	$compilers = [
		"__COMPILER_NAME__"=>[
			"path" => "__COMPILER_PATH__",
			"file_extension" =>'__CODE_FILE_EXTENSION_',
			"compile_func" => __NAME_FOR_YOUR_COMPILER_FUNCTION__,
			"run_func" => __NAME_FOR_YOUR_RUN_FUNCTION__
		]
	];
```

##### Steps

[](#steps)

- Add your customized key for your configuration to use it later in your compile and run function see `src/Core/Config.php`.
- Add your new `StrategyTrait` in `src/Strategy/` folder with your run and compile funcion you can see examples like the `JavaTrait` and `CAndCPPStrategy` then add a use of your `StrategyTrait` in the `src/Core/Core.php` class
- Test and Bom your compiler is there.

License
-------

[](#license)

The MIT License (MIT). Please see [License](https://github.com/aa-ahmed-aa/Dorm/blob/master/LICENSE) File for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~219 days

Total

4

Last Release

2274d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4

v1.4PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/94c26b818b13d83b76b629134582cc365fd1df099cf7e251e53ddedac9df4dc9?d=identicon)[aa-ahmed-aa](/maintainers/aa-ahmed-aa)

---

Top Contributors

[![aa-ahmed-aa](https://avatars.githubusercontent.com/u/9592546?v=4)](https://github.com/aa-ahmed-aa "aa-ahmed-aa (107 commits)")

---

Tags

ccomposercppjavapackagepythonpython2python3command-linepythonjavacppcpython3compilerscompiler-managerjavacpython2

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aa-ahmed-aa-dorm/health.svg)

```
[![Health](https://phpackages.com/badges/aa-ahmed-aa-dorm/health.svg)](https://phpackages.com/packages/aa-ahmed-aa-dorm)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B11.2k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.4k](/packages/nunomaduro-collision)[nategood/commando

PHP CLI Commando Style

8123.3M38](/packages/nategood-commando)[minicli/minicli

Experimental micro CLI framework for PHP

1.1k382.5k47](/packages/minicli-minicli)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)

PHPackages © 2026

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