PHPackages                             krakjoe/jitfu - 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. krakjoe/jitfu

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

krakjoe/jitfu
=============

Stubs and sources for JITFu

19020515[2 issues](https://github.com/krakjoe/jitfu/issues)C

Since Oct 9Pushed 8y ago15 watchersCompare

[ Source](https://github.com/krakjoe/jitfu)[ Packagist](https://packagist.org/packages/krakjoe/jitfu)[ RSS](/packages/krakjoe-jitfu/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

JIT-Fu
======

[](#jit-fu)

[![Build Status](https://camo.githubusercontent.com/4f08f576d90ed055109062a17a92f9f4f3fd3fc69c04263481e7c9a259d4c1fd/68747470733a2f2f7472617669732d63692e6f72672f6b72616b6a6f652f6a697466752e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/krakjoe/jitfu)

*A lesson in the art of JoeJITFu!*

JIT-Fu is a PHP extension that exposes an OO API for the creation of native instructions to PHP userland, using `libjit`.

[![A JoeJITFu elephpant](https://camo.githubusercontent.com/9507139ef99de693374bbf5056b806f73d63d418c8e4604379aec466e6931b4a/687474703a2f2f692e696d6775722e636f6d2f476972494f57732e706e67)](https://camo.githubusercontent.com/9507139ef99de693374bbf5056b806f73d63d418c8e4604379aec466e6931b4a/687474703a2f2f692e696d6775722e636f6d2f476972494f57732e706e67)

*Disclaimer: the elephpant above is an artists rendition, the actual animal may or may not exist ...*

Fibonacci
=========

[](#fibonacci)

*Because apparently, that's super important ...*

```

```

The code above will yield something like the following output on Linux:

```
[joe@localhost jit]$ time php -dextension=jitfu.so objects.php
function Fibonacci(i1 : int) : int
        incoming_reg(i1, rdi)
.L:
        i6 = i1 == 0
        if i1 != 0 then goto .L0
.L:
        return_int(0)
        ends_in_dead
.L0:
        i7 = i1 == 1
        if i1 != 1 then goto .L1
.L:
        return_int(1)
        ends_in_dead
.L1:
        i8 = i1 - 1
        outgoing_reg(i8, rdi)
        call 0x08215dfd0
.L:
        return_reg(i10, rax)
        i12 = i1 - 2
        outgoing_reg(i12, rdi)
        call 0x08215dfd0
.L:
        return_reg(i14, rax)
        i15 = i10 + i14
        return_int(i15)
        ends_in_dead
.L:
.L:
end

int(102334155)

real    0m1.001s
user    0m0.997s
sys     0m0.003s

```

On *my machine*, this is ~60 times faster than PHP.

**This library is not useful for compiling Zend opcodes**

Installation Instructions
=========================

[](#installation-instructions)

Linux
-----

[](#linux)

This extension is being developed against the latest *libjit* sources, it is advisable to install a fresh copy of *libjit* even if the system has one present:

```
git clone git://git.sv.gnu.org/libjit.git
cd libjit
./auto_gen.sh
./configure --prefix=/opt
make
sudo make install

```

Now you can build the PHP extension:

```
git clone https://github.com/krakjoe/jitfu
cd jitfu
phpize
./configure --with-jitfu=/opt
make
sudo make install

```

The example sessions above will result in a build of libjit and JIT-Fu

Windows
-------

[](#windows)

Snapshots of the master branch are built at 1-2 AM UTC on Mondays. Currently only VC11 x86 builds against PHP 5.5 and 5.6 are available, these should work with the packages that can be downloaded from [windows.php.net](http://windows.php.net/). The bundled libjit is built as an self-contained binary with MinGW from a patched version of the master branch.

- Download the appropriate package for your PHP installation from [here](http://dl.daverandom.com/win32/php/jitfu/).
- Place `php_jitfu.dll` in your configured `extension_dir`.
- Place `libjit.dll` in a directory that appears in your `%PATH%`.

**Note**: The `dump()` methods are currently unavailable on Windows. Calling these methods on Windows will result in a `JITFU\Exception` being thrown.

TODO
====

[](#todo)

- integration tests for as much as possible
- other cool things, probably
- pecl &amp; phpdoc

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2236138?v=4)[Joe Watkins](/maintainers/krakjoe)[@krakjoe](https://github.com/krakjoe)

---

Top Contributors

[![krakjoe](https://avatars.githubusercontent.com/u/2236138?v=4)](https://github.com/krakjoe "krakjoe (279 commits)")[![DaveRandom](https://avatars.githubusercontent.com/u/2396425?v=4)](https://github.com/DaveRandom "DaveRandom (6 commits)")[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (1 commits)")

### Embed Badge

![Health badge](/badges/krakjoe-jitfu/health.svg)

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

###  Alternatives

[hollodotme/crontab-validator

A validator for crontab expressions.

11261.2k2](/packages/hollodotme-crontab-validator)

PHPackages © 2026

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