Skip to content
php-baremetal REGISTRY
Publish a package

php-baremetal/ext-hello

bm-ext MIT

Demo extension: bm_hello() only, no dependencies.

needs no platform HAL

The minimal example extension of php-baremetal. It adds one function, bm_hello(), to the PHP that runs on your board, and nothing else: no hardware, no HAL, no options. Require it to check that a project builds the packages it asks for, or read it as the smallest possible bm-ext package: one C file and a composer.json.

ext-hello is pure: it has no HAL, so it works on every platform.

Install

In a project created with phpbm init:

bash
composer require php-baremetal/ext-hello

Example

php
<?php
echo bm_hello(), "\n";   // hello from ext-hello package

Documentation

License

MIT.

Read the full documentation