aboutsummaryrefslogtreecommitdiff
path: root/lib/command-helper.php
diff options
context:
space:
mode:
authorMaZderMind2016-12-11 19:57:20 +0100
committerMaZderMind2016-12-11 20:38:28 +0100
commit3c3d0ac7301e818b14d01b9bbc949ca13d2cf798 (patch)
treeaac3b955ea2d46ad2bde25d548f74c086e26138b /lib/command-helper.php
parent4e85b423354d8b715d12540fbd2ac79a66de3399 (diff)
commandline helper functions
Diffstat (limited to 'lib/command-helper.php')
-rw-r--r--lib/command-helper.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/command-helper.php b/lib/command-helper.php
new file mode 100644
index 0000000..c406b9e
--- /dev/null
+++ b/lib/command-helper.php
@@ -0,0 +1,15 @@
+<?php
+
+function stderr($str) {
+ $args = func_get_args();
+ $args[0] = $args[0]."\n";
+ array_unshift($args, STDERR);
+ call_user_func_array('fprintf', $args);
+}
+
+function stdout($str) {
+ $args = func_get_args();
+ $args[0] = $args[0]."\n";
+ array_unshift($args, STDOUT);
+ call_user_func_array('fprintf', $args);
+}