- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
pclose() function in PHP
The pclose() function closes a pipe opened by popen(). It returns the termination status of the process that was run. In case of an error -1 is returned.
Syntax
pclose(file_pointer)
Parameters
file_pointer − Specifies the pipe
Return
The pclose() function returns the termination status of the process that was run. In case of an error -1 is returned.
Example
<?php // opening a pipe $file_pointer = popen("/bin/ls", "r"); pclose($file_pointer); ?>
Output
TRUE
Let us see another example.
Example
<?php // opening a pipe $file_pointer = popen("/executable/setup.exe", "r"); pclose($file_pointer); ?>
Output
TRUE
Advertisements