PHPackages                             codeboy124/phx - 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. codeboy124/phx

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

codeboy124/phx
==============

A simple function that convert some html string with components (that optionally contain scoped js and css) into regular html

00PHP

Since May 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/CodeBoy124/phx)[ Packagist](https://packagist.org/packages/codeboy124/phx)[ RSS](/packages/codeboy124-phx/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Phx Package Documentation
=========================

[](#phx-package-documentation)

Introduction
------------

[](#introduction)

The Phx package is a PHP Composer package that allows you to use a JSX-like syntax in your PHP applications. This package contains some functions that enable you to create and render components in a more declarative and intuitive way.

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

[](#installation)

To install the Phx package, you need to have Composer installed in your PHP environment. Then, you can run the following command:

```
composer require codeboy124/phx

```

Usage
-----

[](#usage)

### `Phx::Run`

[](#phxrun)

The `Phx::Run` function is used to execute a string that represents JSX-like code. It takes the string as an argument and renders the corresponding component.

#### **paramaters**

[](#paramaters)

- $content (string): The phx code to turn into regular html

#### **returns**

[](#returns)

string: The content as a string containing html

#### **example**

[](#example)

```
