3 * Prototype: resource popen ( string command, string mode )
4 * Description: Opens process file pointer.
6 * Prototype: int pclose ( resource handle );
7 * Description: Closes process file pointer.
9 $file_path = dirname(__FILE__
);
10 echo "*** Testing for error conditions ***\n";
11 var_dump( popen() ); // Zero Arguments
12 var_dump( popen("abc.txt") ); // Single Argument
13 var_dump( popen("abc.txt", "rw") ); // Invalid mode Argument
15 $file_handle = fopen($file_path."/popen.tmp", "w");
16 var_dump( pclose($file_handle, $file_handle) );
18 var_dump( pclose(1) );
19 echo "\n--- Done ---";
21 $file_path = dirname(__FILE__
);
22 unlink($file_path."/popen.tmp");