Skip to content

Instantly share code, notes, and snippets.

@kezzyhko
Created February 19, 2024 02:10
Show Gist options
  • Save kezzyhko/02106ee3409f6b313754a0e488cd4ede to your computer and use it in GitHub Desktop.
Save kezzyhko/02106ee3409f6b313754a0e488cd4ede to your computer and use it in GitHub Desktop.
<?php
function shell_with_print($cmd_pattern, ...$argv) {
$cmd = sprintf("$cmd_pattern 2>&1", ...$argv);
echo $cmd;
echo "\n";
system($cmd, $ret);
return ($ret == 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment