PHPackages                             thettler/pht - 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. thettler/pht

ActiveLibrary

thettler/pht
============

This is my package pht

v0.0.1(4y ago)35[2 PRs](https://github.com/thettler/pht/pulls)MITPHPPHP ^8.1

Since Mar 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/thettler/pht)[ Packagist](https://packagist.org/packages/thettler/pht)[ Docs](https://github.com/thettler/pht)[ GitHub Sponsors](https://github.com/thettler)[ RSS](/packages/thettler-pht/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (7)Versions (4)Used By (0)

[![](https://camo.githubusercontent.com/2bedf63f24cda7efab02da955dc11fb7ef8a060e2f26b73c33a7aac84529b8a3/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f737570706f72742d756b7261696e652e7376673f743d31)](https://supportukrainenow.org)

PHT: Something like Typescript but for PHP
==========================================

[](#pht-something-like-typescript-but-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/90a78792765b67094e35465873e8fff0a3c36230cdde8368bd895450c9740eaf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74686574746c65722f7068742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/thettler/pht)[![Tests](https://github.com/thettler/pht/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/thettler/pht/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/e027c84d8be1842022eeefbe605ea9ceb65ba17692e02f1397baff9e6020ff79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74686574746c65722f7068742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/thettler/pht)

> ❗ ❗ This is only a prototype and a Proof of concept. It is not meant to be used seriously and has a lot of bugs. You can read about it here [PHT: Building Typescript for PHP](https://bitbench.dev/blog/pht-building-typescript-for-php). But feel free to contribute and spin the idea even further ❗ ❗

This is just a little proof of concept for everybody to play around. For a better explanation read the article on [bitbench.dev - PHT: Building Typescript for PHP](https://bitbench.dev/blog/pht-building-typescript-for-php)

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

[](#installation)

You can install the package via composer:

```
composer require thettler/pht
```

Usage
-----

[](#usage)

To start the watcher

```
./vendor/bin/pht dev
```

by default, it will look inside the 'app' directory for any .pht files and compiles them into the '.pht' directory.

### Autoload

[](#autoload)

To enable auto-loading find your `autoload.php` require and call right after the `Thettler\Pht\PHT::autoload($loader)`.

```
$loader = require __DIR__.'/../vendor/autoload.php';
Thettler\Pht\PHT::autoload($loader);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Tobias Hettler](https://github.com/thettler)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

1505d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6caaa4ad5c531405e77f53cc9db5e523f267b45a45b3eefeb13560cccaf001aa?d=identicon)[thettler](/maintainers/thettler)

---

Top Contributors

[![thettler](https://avatars.githubusercontent.com/u/12132389?v=4)](https://github.com/thettler "thettler (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")

---

Tags

thettlerpht

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M16.9k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)

PHPackages © 2026

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