Using the PHP passthru() Function
<?php passthru("ls", $return_val); echo "Exit code of $return_val\n"; ?>