| update notes | ||
|---|---|---|
| mario authored 204 days ago last checkin 1395bcb11 ⎘ | ||
| ๐ Makefile | Reworked wrapper script to allow for piping and `-` placeholder paramโนโบ | 4055 days ago |
| ๐ pipefunc.php | Use array_shift for multiple positional - - - stdin/json placeholdersโนโบ | 4055 days ago |
php
Shell PHP function wrappers
Allow to call plain PHP functions from the command line.
Parameters can be passed as arguments:
strtolower ABCOr passed in from stdin:
echo ABC | strtolowerAnd array functions can use JSON
echo [1,2,3] | print_rAlternatively as positional parameters
echo '[1,2,3]' | var_dump -
It's most useful of course with simple string-to-string pipes:
cat file | gzencode | base64_encode | base64_decode | gzdecode | print_r
(Or something more pointful..)