PHPackages                             raudius/luar - 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. raudius/luar

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

raudius/luar
============

Lua interpreter written entirely in PHP

0.1.4(2y ago)152.5k4[1 issues](https://github.com/Raudius/Luar/issues)[1 PRs](https://github.com/Raudius/Luar/pulls)GPL-2.0-onlyPHP

Since Nov 21Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Raudius/Luar)[ Packagist](https://packagist.org/packages/raudius/luar)[ RSS](/packages/raudius-luar/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Luar
====

[](#luar)

Luar is a Lua interpreter written in PHP.

Luar implements a reduced version of Lua and also packages some essential Lua libraries. As such Luar offers forward-compatibility with Lua with some minor caveats:

- The math/string libraries use PHP number/string handling; much of the edge-case behaviour has **not** been replicated (e.g. division by zero, integer overflow)
- Not all core functions and libraries are available, but a method is provided to inject your own
- Some language constructs are not implemented (e.g. variable attributes, go-to statements)

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

[](#installation)

```
composer require raudius/luar

```

Usage
-----

[](#usage)

For more details read [the documentation](docs/README.md).

```
$luar = new Luar();
$luar->assign('world', 'Moon');
$luar->assign('hello_world', function ($name='world') {
    return "Hello, $name!";
});

$program = '
    local greeting = hello_world(world)
    print(greeting)

    return greeting
';

$greeting = $luar->eval($program);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

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

Total

5

Last Release

1038d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3178979?v=4)[Raul Ferreira Fuentes](/maintainers/Raudius)[@Raudius](https://github.com/Raudius)

---

Top Contributors

[![Raudius](https://avatars.githubusercontent.com/u/3178979?v=4)](https://github.com/Raudius "Raudius (44 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/raudius-luar/health.svg)

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

###  Alternatives

[symfony/polyfill-php72

Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions

4.7k674.7M31](/packages/symfony-polyfill-php72)[consolidation/site-process

A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify the target for a remote call.

5345.3M8](/packages/consolidation-site-process)[sycho/flarum-profile-cover

Adds the ability to add a cover image to a profile.

1836.6k](/packages/sycho-flarum-profile-cover)

PHPackages © 2026

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