-
Notifications
You must be signed in to change notification settings - Fork 0
hotpocket/Php_Shell
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Since ffmpeg likes to spew onto stderr and I didn't want to combine the streams I opted for this approach.
Features:
* Run and stay resident shell process saves on shell proc construct/destruct ops
* Can attach to stderr and/or stdout per line("\r\n","\r","\n") with a callback
* Can background a process easily
-- Potential Improvements --
* some setter/getter for what ENV to pass to shell (instead of being hard coded)
----------
-- CODE --
----------
$bash = new Bash();
### Optional callback (stdout)
#$callback = function($line) { printf("callbackLine: %s\r\n", $line); };
#$result = $bash->run("ls -l",false,$callback);
# see $bash->run() code docs for invocation options and expected return types.
$result = $bash->run("ls -l");
var_export($result);
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published