array('pipe', 'r'), // 1 => array('pipe', 'w'), // 2 => array('pipe', 'a') ); $shell = proc_open('/usr/bin/env BJORK_INTERACTIVE_SHELL=1 php '. '-d "include_path='.escapeshellarg(get_include_path()).'" '. '-a', $descriptorspec, $pipes); if (is_resource($shell)) { proc_close($shell); fwrite(STDOUT, "\n"); } } }