# How to run PHP code in a sandbox Install php-cli in a Linux microVM. Write the script, then run it with `php` under a time limit and with the network off. **On Runtime, PHP is one apt command away, and every script gets its own kernel.** Each sandbox is a Firecracker microVM that runs Ubuntu 24.04.5. There, `sudo apt-get install -y php-cli` installs PHP 8.3 from Ubuntu's archive. If you bake PHP into an image, that sandbox start is the only wait. ## PHP packages on Ubuntu 24.04 PHP is not in the default image. The packages below are for Ubuntu 24.04 (noble). They were read in Ubuntu's archive on 26 October 2026: | Package | Version | What it adds | | ---------------- | ------------------------ | -------------------------------- | | `php-cli` | 8.3 (`php8.3-cli` 8.3.6) | The `php` command | | `php8.3-sqlite3` | 8.3.6 | PDO and SQLite3 for SQLite | | `php8.3-pgsql` | 8.3.6 | PDO and pgsql for PostgreSQL | | `composer` | 2.7.1 | Composer, the dependency manager | For another PHP version, start a [custom image](/docs/images) from the official `php` image on Docker Hub. An example is `php:8.4-cli`, a tag listed there on 26 October 2026. ## Run a script Install PHP once, turn off the internet, then run the script. The script is written as a file and runs from an array command, so nothing passes through a shell. ```ts check import { Sandbox } from "withruntime"; const script = `