PHPackages                             syntaxx/phpx-compiler - 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. syntaxx/phpx-compiler

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

syntaxx/phpx-compiler
=====================

JSX-like syntax for PHP with WebAssembly and SSR support

v0.1.0(6mo ago)2212MITPHP

Since Oct 26Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Syntaxx-HQ/PHPX-Compiler)[ Packagist](https://packagist.org/packages/syntaxx/phpx-compiler)[ RSS](/packages/syntaxx-phpx-compiler/feed)WikiDiscussions main Synced 1mo ago

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

PHPX - JSX-like Syntax for PHP
==============================

[](#phpx---jsx-like-syntax-for-php)

PHPX is a powerful library that brings JSX-like syntax to PHP, enabling developers to write component-based UI code in PHP with a familiar JSX syntax. It supports both Frontend rendering through WebAssembly and Server-Side Rendering (SSR).

Features
--------

[](#features)

- **JSX-like syntax in PHP**: Write React-style components with familiar JSX syntax
- **Component-based architecture**: Build modular, reusable UI components
- **Dual-target support**: Compile for both Frontend (WebAssembly) and Server-Side Rendering
- **Seamless integration**: Works with existing PHP applications
- **Developer-friendly**: Familiar syntax for React/JSX developers
- **Type-safe development**: Leverage PHP's type system for component props
- **Powerful CLI**: Multi-level verbose mode with colored output and JSON format
- **Rust-style error messages**: Beautiful, context-rich error formatting with hints
- **Source maps**: Debug mode generates source maps (v3) for accurate error tracking
- **AI/LLM-friendly**: Structured JSON output, AI source maps with semantic context, and LLM-optimized debugging hints
- **Event system**: Hook into the compilation process for custom tooling and monitoring
- **Zero configuration**: Works out of the box with sensible defaults

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

[](#quick-start)

**New to PHPX?** Start with the **[PHPX Guide](docs/phpx-guide.md)** for a complete introduction!

### Installation

[](#installation)

```
composer require syntaxx/phpx-parser
```

Basic Usage
-----------

[](#basic-usage)

```
