Skip to content

Instantly share code, notes, and snippets.

@jakubkulhan
Created August 4, 2010 10:58
Show Gist options
  • Select an option

  • Save jakubkulhan/507965 to your computer and use it in GitHub Desktop.

Select an option

Save jakubkulhan/507965 to your computer and use it in GitHub Desktop.
<?php
namespace sh\commands;
function hello(array $argv, array $envp, array $descriptors)
{
// $descriptors[0] is stdin
// $descriptors[1] is stdout
// $descriptors[2] is stderr
fwrite($descriptors[1], "hello, world!\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment