Skip to content

Instantly share code, notes, and snippets.

@savvot
Created June 5, 2014 13:53
Show Gist options
  • Select an option

  • Save savvot/4c67efe1a8b2b92b8e14 to your computer and use it in GitHub Desktop.

Select an option

Save savvot/4c67efe1a8b2b92b8e14 to your computer and use it in GitHub Desktop.

Revisions

  1. savvot created this gist Jun 5, 2014.
    7 changes: 7 additions & 0 deletions popen-example.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    <?php

    $fp = popen('ls 2>&1', 'r');
    while(!feof($fp)) {
    $str = fgets($fp);
    }
    pclose($fp);