Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Hello World Example

The simplest possible php-universe application.

Quick Start

cd examples/hello-world
composer install
px build --target=native
./dist/hello-world "PHP Universe"

What This Example Shows

  • Basic PHP functions
  • CLI entry point detection
  • Simple function exports for WASM
  • Minimal configuration

Building for Different Targets

# Native binary
px build --target=native
./dist/hello-world

# WebAssembly
px build --target=wasm
# Then use the generated .wasm file in your web app

Files

  • src/main.php - Main application code
  • universe.toml - Build configuration
  • composer.json - PHP dependencies