A tiny playground for tinkering with PHP snippets in the browser
This is the source code repository of PHP Arena. You can find the app at loilo.github.io/php-arena.
The core technologies this project uses are:
Technology | Purpose |
---|---|
Codemirror | A text/code editor, used for the editing area itself. |
Nuxt | An application framework for Vue.js, used for prerendering, PWA support and overall application structure. |
@php-wasm/web |
WASM-compiled builds of the PHP interpreter, made by the WordPress team. |
lz-string |
A quick and space-efficient compression algorithm, used for serializing the current app state into a shareable URL in as few characters as possible. |
GitHub Pages | This app does (purposefully) not generate any income. Therefore, free, scalable hosting is essential to keep it running. |
Clone this repository and install its dependencies using npm.
npm ci
Start a local dev server with hot reloading:
npm run dev
Create a production-ready site in the dist
folder:
npm run generate
Set the BASE_URL
environment variable to create a build that can be hosted in a subfolder of a domain, e.g.:
BASE_URL=/php-arena/ npm run generate