Skip to main content

Overview

Minimal host driver API check.

Example

<?php
require 'examples/boot.php';

use Cognesy\Sandbox\Config\ExecutionPolicy;
use Cognesy\Sandbox\Sandbox;

$policy = ExecutionPolicy::in(__DIR__);

$result = Sandbox::host($policy)->execute(['echo', 'hello from host sandbox']);

echo "Exit: {$result->exitCode()}\n";
echo $result->stdout();
?>