PHPackages                             ivopetkov/html-server-components-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. ivopetkov/html-server-components-compiler

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

ivopetkov/html-server-components-compiler
=========================================

HTML Server Components compiler

v1.6.0(5mo ago)94.1k22MITPHPPHP 8.0.\*|8.1.\*|8.2.\*|8.3.\*|8.4.\*|8.5.\*

Since Jan 13Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/ivopetkov/html-server-components-compiler)[ Packagist](https://packagist.org/packages/ivopetkov/html-server-components-compiler)[ Docs](https://github.com/ivopetkov/html-server-components-compiler)[ Fund](https://www.paypal.me/ivopetkovcom)[ GitHub Sponsors](https://github.com/ivopetkov)[ RSS](/packages/ivopetkov-html-server-components-compiler/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (2)Versions (41)Used By (2)

HTML Server Components compiler (in PHP)
========================================

[](#html-server-components-compiler-in-php)

**A brand new way to build websites**

It's a simple idea:

Instead of using template engines or PHP includes in your HTML code use the &lt;component&gt; tag. It allows you to:

- Include code from other files (``).
- Pass arguments (``) that are available in the file (`$component->getAttribute('pageID')` or just `$component->pageID`).
- Automatically places the included file HTML code into the proper places (Tags in the `head` go in the parent document `head`).
- Makes easy to test each component because each component outputs full HTML code.

[![Latest Stable Version](https://camo.githubusercontent.com/7885c0fd0605870d2327ffd083656fcc5b4221d94b8fe07e6c0f379a3f5145cc/68747470733a2f2f706f7365722e707567782e6f72672f69766f7065746b6f762f68746d6c2d7365727665722d636f6d706f6e656e74732d636f6d70696c65722f762f737461626c65)](https://packagist.org/packages/ivopetkov/html-server-components-compiler)[![License](https://camo.githubusercontent.com/672df9815298d57b35c5e44510667b88d98e832d892633199a3879b4118da79f/68747470733a2f2f706f7365722e707567782e6f72672f69766f7065746b6f762f68746d6c2d7365727665722d636f6d706f6e656e74732d636f6d70696c65722f6c6963656e7365)](https://packagist.org/packages/ivopetkov/html-server-components-compiler)

Install via Composer
--------------------

[](#install-via-composer)

```
composer require ivopetkov/html-server-components-compiler
```

Usage
-----

[](#usage)

```
$compiler = new IvoPetkov\HTMLServerComponentsCompiler();
echo $compiler->process('

')
```

Documentation
-------------

[](#documentation)

Full [documentation](https://github.com/ivopetkov/html-server-components-compiler/blob/master/docs/markdown/index.md) is available as part of this repository.

Demo
----

[](#demo)

A demo is available at . The source is also [there](https://github.com/ivopetkov/ivopetkov.github.io/tree/master/demos/html-server-components/).

License
-------

[](#license)

This project is licensed under the MIT License. See the [license file](https://github.com/ivopetkov/html-server-components-compiler/blob/master/LICENSE) for more information.

Contributing
------------

[](#contributing)

Feel free to open new issues and contribute to the project. Let's make it awesome and let's do in a positive way.

Author
------

[](#author)

This library is created and maintained by [Ivo Petkov](https://github.com/ivopetkov/) ([ivopetkov.com](https://ivopetkov.com)).

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance71

Regular maintenance activity

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

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

Recently: every ~258 days

Total

40

Last Release

161d ago

Major Versions

v0.8.1 → v1.0.02021-01-02

PHP version history (7 changes)v0.1.0PHP &gt;=5.5.0

v0.6.0PHP &gt;=7.0.0

v1.0.1PHP 7.0.\*|7.1.\*|7.2.\*|7.3.\*|7.4.\*|8.0.\*

v1.1.0PHP 7.0.\*|7.1.\*|7.2.\*|7.3.\*|7.4.\*|8.0.\*|8.1.\*

v1.3.0PHP 7.0.\*|7.1.\*|7.2.\*|7.3.\*|7.4.\*|8.0.\*|8.1.\*|8.2.\*|8.3.\*

v1.5.0PHP 8.0.\*|8.1.\*|8.2.\*|8.3.\*|8.4.\*

v1.6.0PHP 8.0.\*|8.1.\*|8.2.\*|8.3.\*|8.4.\*|8.5.\*

### Community

Maintainers

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

---

Top Contributors

[![ivopetkov](https://avatars.githubusercontent.com/u/13205385?v=4)](https://github.com/ivopetkov "ivopetkov (103 commits)")

---

Tags

compilercomponentshtmlhtml-componentshtmlHTML Server Components compiler

### Embed Badge

![Health badge](/badges/ivopetkov-html-server-components-compiler/health.svg)

```
[![Health](https://phpackages.com/badges/ivopetkov-html-server-components-compiler/health.svg)](https://phpackages.com/packages/ivopetkov-html-server-components-compiler)
```

###  Alternatives

[spatie/laravel-html

A fluent html builder

8376.4M72](/packages/spatie-laravel-html)[ckeditor/ckeditor

JavaScript WYSIWYG web text editor.

5234.2M76](/packages/ckeditor-ckeditor)[caxy/php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

21520.9M15](/packages/caxy-php-htmldiff)[yajra/laravel-datatables-html

Laravel DataTables HTML builder plugin

2899.6M48](/packages/yajra-laravel-datatables-html)[wa72/htmlpagedom

jQuery-inspired DOM manipulation extension for Symfony's Crawler

3383.9M34](/packages/wa72-htmlpagedom)[tinymce/tinymce

Web based JavaScript HTML WYSIWYG editor control.

1697.5M106](/packages/tinymce-tinymce)

PHPackages © 2026

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