PHPackages                             pphlx/pphlx - 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. pphlx/pphlx

ActiveLibrary

pphlx/pphlx
===========

High-performance Monolithic Web Compiler and PHP Hydration Runtime

v1.1.7(1mo ago)119MITJavaScriptPHP &gt;=7.4

Since Jul 14Pushed 1mo agoCompare

[ Source](https://github.com/pphlx/composer)[ Packagist](https://packagist.org/packages/pphlx/pphlx)[ Fund](https://pphlx.org/sponsor)[ GitHub Sponsors](https://github.com/composer)[ RSS](/packages/pphlx-pphlx/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (17)Used By (0)

PPHLX for PHP (Composer Integration)
====================================

[](#pphlx-for-php-composer-integration)

 [![Bring Your Own UI Framework](.github/assets/banner.webp)](.github/assets/banner.webp)

 [PPHLX](https://pphlx.org) is the high-performance monolithic compiler for modern PHP web applications.
 Build component-driven PHP apps with React, Vue, Svelte, or pure PHP templates — with zero Node.js runtime in production.

 [![Latest Stable Version](https://camo.githubusercontent.com/f133a49ddb1c6817dbe79e6f38e23355e39b86a62edbaf62fe5701e31652a8ae/68747470733a2f2f706f7365722e707567782e6f72672f7070686c782f7070686c782f762f737461626c65)](https://packagist.org/packages/pphlx/pphlx) [![License](https://camo.githubusercontent.com/962928179349e860a04b64983bd5e2a9f35e66eb1fc1114d82f3981dca7c35df/68747470733a2f2f706f7365722e707567782e6f72672f7070686c782f7070686c782f6c6963656e7365)](https://packagist.org/packages/pphlx/pphlx)

Official Packagist package for **PPHLX**. Enables you to compile `.pphx` templates and render hydrated multi-framework component layouts natively inside any PHP application (Laravel, WordPress, or custom scripts).

---

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

[](#installation)

Install PPHLX inside your PHP project using Composer:

```
composer require pphlx/pphlx
```

*Note: PPHLX runs as a WebAssembly compiler under the hood. A local execution runtime (such as Node.js or Wasmer) is required on your development machine to compile templates.*

---

Compilation CLI
---------------

[](#compilation-cli)

This package registers a vendor binary executable. You can run the compiler from the root of your PHP project:

```
# Initialize project configurations
vendor/bin/pphlx init

# Start local hot-reload compiler server
vendor/bin/pphlx dev

# Run diagnostic template validation
vendor/bin/pphlx check

# Compile templates to production-ready PHP files
vendor/bin/pphlx

# Preview the compiled production site locally
vendor/bin/pphlx preview
```

---

Runtime Usage
-------------

[](#runtime-usage)

Once templates are compiled to standard `.php` files inside your output directory, you can load and render them using the built-in runtime engine:

```
use PPHLX\Engine;

// Render template with context state variables
$html = Engine::render(__DIR__ . '/dist/index.php', [
    'reactTitle' => 'Interactive Rating Widget',
    'vueDefaultTemp' => 22
]);

echo $html;
```

---

Multi-Target Compilation
------------------------

[](#multi-target-compilation)

PPHLX supports compiling your application to multiple target formats. By default, it compiles to standard `.php` files. You can configure this inside `pphlx.config.json` or override it on the fly using CLI flags.

### Configuration (`pphlx.config.json`)

[](#configuration-pphlxconfigjson)

To configure a default target, add the `"output"` block:

```
{
  "srcDir": "src",
  "outDir": "dist",
  "output": {
    "target": "desktop",
    "goos": "darwin",
    "goarch": "arm64"
  }
}
```

- `target`: `"php"` (default), `"standalone"` (headless Go server binary), `"desktop"` (native desktop GUI app), `"android"` (scaffolded Android Studio Gradle project), `"ios"` (scaffolded Swift Xcode project), `"ssg"` (static HTML/JS/CSS), or `"blade"`/`"twig"` (framework-native template views).
- `goos` / `goarch`: (Optional) Target cross-compilation OS (e.g. `linux`, `darwin`, `windows`) and architecture (e.g. `amd64`, `arm64`) when compiling standalone or desktop binaries.

### CLI Overrides

[](#cli-overrides)

Pass the `--target` (or `-t`) flag to temporarily customize the output target during a build:

```
# Compile to a Standalone Go Binary
vendor/bin/pphlx build --target standalone

# Compile to a Native Desktop App
vendor/bin/pphlx build --target desktop

# Compile to an Android Gradle project
vendor/bin/pphlx build --target android

# Compile to an iOS Xcode project
vendor/bin/pphlx build --target ios

# Compile to Static HTML (SSG)
vendor/bin/pphlx build --target ssg

# Compile to Laravel Blade templates
vendor/bin/pphlx build --target blade

# Compile to Symfony Twig templates
vendor/bin/pphlx build --target twig
```

---

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance94

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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 ~1 days

Total

16

Last Release

31d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8276a4794dbf4b2b8196bdc7d5af64803dde5ff33889a756dfa25ff4bdf36da?d=identicon)[pphlx](/maintainers/pphlx)

---

Tags

phpcompilerreactvuehydrationsveltewebassemblyislands

### Embed Badge

![Health badge](/badges/pphlx-pphlx/health.svg)

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

###  Alternatives

[carbon/pipeline

Ultra-fast build stack for Neos CMS based on esbuild and PostCSS

1730.6k1](/packages/carbon-pipeline)[nytodev/inertia-bundle

Symfony Bundle implementing the Inertia.js v3 server-side protocol

212.2k](/packages/nytodev-inertia-bundle)

PHPackages © 2026

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