v1.169.0 · macOS, Linux, Android, iOS

Desktop & mobile apps in PHP. Tiny, fast, GPU-accelerated.

One single binary for macOS, Linux, Android and iOS. Native UI or a web frontend in PHP 8.3+, with zero C extensions and ext-ffi.

$ curl -fsSL https://myphp.ai/install.sh | bash
Get started →
~5.3MB
Binary / App
~44MB
Memory, native UI
~62MB
Memory, webview
0%
CPU at idle
app.php (Immediate Mode GPU Native UI)
use MyPHP\{App, Window, WindowOptions};
use MyPHP\UI\{Content, Context};

$count = 0;

App::whenReady(function () use (&$count) {
    new Window(new WindowOptions(
        title: 'Counter',
        width: 360,
        height: 240,
        content: Content::view(function (Context $c) use (&$count) {
            $c->column(pad: 24, gap: 12, align: 1);
                $c->text("Tapped $count times", size: 22);
                if ($c->clicked($c->button('Increment'))) {
                    $count++;
                }
            $c->end();
        })
    ));
});

App::run();
No webview

The view is a PHP function of your app's state. MyPHP calls it to build each frame and draws it on the GPU, with Metal, OpenGL or Direct3D: no HTML, no JavaScript, no bindings.

Its windows open at once, and an app of native UI alone needs only PHP to build and no webview to run.

Start a project
$ myphp init my-app
$ cd my-app && myphp run
Web frontends ↗
Any web stack (Vue, React, Svelte, Vite), in the webview the OS already has: WKWebView, WebKitGTK. No heavy Chromium bundled.
Native GPU UI ↗
Interfaces written in PHP alone and drawn on the GPU: Metal & GLES, flexbox & grid layout, virtualized lists, rich text, full touch gestures.
Typed IPC ↗
Pages call bound PHP services, stream values through channels and get typed events. The TypeScript client is generated from your PHP code.
Mobile & Desktop ↗
True cross-platform: macOS, Linux, Android 12+ (zero-Gradle APK) and iOS 16+ (Metal 120Hz ProMotion) with unified APIs.
Pure PHP, no C extensions ↗
Reaching the operating system libraries through ext-ffi only. Build for every target platform from any machine.
Ready to ship ↗
App bundles and disk images (.dmg), iOS .ipa, Android .apk, Debian packages, code signing and auto-updates.