the biggest addition to php5 is object oriented programming aspects, specifically it acts more like java (exception handling, etc.)) "$ php wordwrap.php < input.txt > output.txt Inside your script, however, you don't know about input.txt and output.txt. You only know that you're to process data from php://stdin and print the results to php://stdout. This allows you to create a generalized script that works in conjunction with other command-line tools. To read from standard input, do this: $stdin = file_get_contents('php://stdin'); To write to standard output, do this: file_put_contents('php://stdout', $data); This simple script rewraps text to 10 characters: $stdin = file_get_contents('php://stdin'); $data = wordwrap($stdin, 10); file_put_contents('php://stdout', $data);" tidy class cleans up html!