The php code runner for any PHP project
This package is compile into a single phar
file, you can download it from the release page.
php chain.phar "echo 'Hello, World!';"
php chain.phar --target=/path/to/project "echo 'Hello, World!';"
You can pass they as base64 encoded string with --base64
option:
PHP code:
$name = "Tom";
echo "Hello, $name!";
First, you need to encode it to base64:
JG5hbWUgPSAiVG9tIjsNCmVjaG8gIkhlbGxvLCAkbmFtZSEiOw==
Then run it, so you don't have to deal with escaping characters:
php chain.phar --target=/path/to/project --base64 "JG5hbWUgPSAiVG9tIjsNCmVjaG8gIkhlbGxvLCAkbmFtZSEiOw=="
composer build