PHPackages                             linkorb/lua - 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. linkorb/lua

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

linkorb/lua
===========

Lua PHP: Library for extending your application with lua scripts

v1.1.0(5y ago)152411MITPHPPHP &gt;=7.2.0

Since Jul 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/linkorb/lua-php)[ Packagist](https://packagist.org/packages/linkorb/lua)[ Docs](http://www.github.com/linkorb/lua-php)[ RSS](/packages/linkorb-lua/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Lua PHP
=======

[](#lua-php)

This library enables you to add Lua scripting support to your PHP applications.

LuaSandbox
----------

[](#luasandbox)

The LuaSandbox class allows you to easily run user-supplied Lua scripts in an empty sandbox environment. This means that dangerous functions (i.e. for file and network IO) are unavailable by default. To make the sandbox useful, you register your own PHP-implemented functions that you allow the chunks to execute.

Use-cases
---------

[](#use-cases)

- Support user-supplied scripts to respond to events in your application
- Advanced expressions, filters, segments
- Customizable routing
- ... and many more :)

Usage
-----

[](#usage)

Check the `example/` directory for a well-documented example.

About Lua
---------

[](#about-lua)

- Website:
- Wikipedia: [https://en.wikipedia.org/wiki/Lua\_(programming\_language)](https://en.wikipedia.org/wiki/Lua_(programming_language))

Requirements
------------

[](#requirements)

This library requires that the [PHP Lua extension](https://www.php.net/manual/en/book.lua.php) is installed.

A quick install guide for Ubuntu:

```
# Install lua library
apt-get install -y --no-install-recommends lua5.3 liblua5.3-dev
# pecl expects liblua and includes in specific locations, so move them around a bit:
cp /usr/lib/x86_64-linux-gnu/liblua5.3.a /usr/lib/liblua.a
cp /usr/lib/x86_64-linux-gnu/liblua5.3.so /usr/lib/liblua.so
ln -s /usr/include/lua5.3 /usr/include/lua
# Install the lua extension through pecl
pecl install lua
# Activate the lua extension in your PHP config
php --ini # find out where your PHP config files are located
echo "extension=lua.so" > /path/to/my/php/conf.d/lua.ini
```

License
-------

[](#license)

MIT. Please refer to the [license file](LICENSE) for details.

Brought to you by the LinkORB Engineering team
----------------------------------------------

[](#brought-to-you-by-the-linkorb-engineering-team)

[![](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)
Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

2

Last Release

2119d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (2 commits)")

---

Tags

phplinkorbsandboxscriptinglua

### Embed Badge

![Health badge](/badges/linkorb-lua/health.svg)

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

###  Alternatives

[eftec/minilang

A mini scripting language for php

113.2k2](/packages/eftec-minilang)

PHPackages © 2026

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