PHPackages                             enhance-dev/ssr - 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. enhance-dev/ssr

ActiveLibrary

enhance-dev/ssr
===============

A PHP library for server-side rendering with Enhance

v0.0.5(2y ago)23221[1 PRs](https://github.com/enhance-dev/enhance-ssr-php/pulls)1Apache-2.0PHP

Since Apr 11Pushed 1y ago3 watchersCompare

[ Source](https://github.com/enhance-dev/enhance-ssr-php)[ Packagist](https://packagist.org/packages/enhance-dev/ssr)[ RSS](/packages/enhance-dev-ssr/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (7)Used By (1)

Enhance SSR PHP
===============

[](#enhance-ssr-php)

A library for server rendering web components in PHP that is compatible with Enhance SSR ([Enhance.dev](https://enhance.dev)).

Runtime: WASM or native PHP
---------------------------

[](#runtime-wasm-or-native-php)

This package includes both a WASM and native PHP version of enhance ssr. The WASM version allows component definitions written in JavaScript, but has specific requirements for the hosting environment that may be challenging. The examples directory includes examples of both versions.

Install
-------

[](#install)

This package can be managed and installed with Composer:

```
composer require enhance-dev/ssr
```

The Extism dependency currently requires `"minimum-stability":"dev"` in the `composer.json` file.

Run Examples
------------

[](#run-examples)

To run the native and WASM examples run `composer serve-native` or `composer serve-wasm` respectively.

Usage:
------

[](#usage)

See usage examples for native PHP and WASM in the examples directory.

### Native PHP

[](#native-php)

```
