RosettaCodeData/Task/Execute-a-system-command/PHP/execute-a-system-command-2.php
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

11 lines
257 B
PHP

$results = `ls`;
# runs command and returns its STDOUT as a string
system("ls");
# runs command and returns its exit status; its STDOUT gets output to our STDOUT
echo `ls`;
# the same, but with back quotes
passthru("ls");
# like system() but binary-safe