Skip to content

timberphp/timber-chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timber chain

The php code runner for any PHP project

Usage

This package is compile into a single phar file, you can download it from the release page.

To run PHP code at current directory:

php chain.phar "echo 'Hello, World!';"

To run PHP code at a specific directory:

php chain.phar --target=/path/to/project "echo 'Hello, World!';"

To run with multiple lines of code

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=="

Build

    composer build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages