13.0 Introduction


Sometimes PHP can't get the job done, or it can get the job done, but not quickly or efficiently enough for the needs of your program. Perhaps you simply need to get the output of another program for manipulation. In any of these situations, you need to perform interprocess communication, which is when you communicate and work with another program (known as a process ).

But before we go on, a disclaimer: Most of the information in this chapter is meant either solely for a UNIX system or solely for a Windows NT system. Interprocess communication (IPC) is not as universal as strings, arrays, and numbers because it deals with other processes, not just PHP. Some examples here will work fine on NT but not on UNIX (such as recipe 13.5), and vice versa. When using interprocess communication, you are not dealing with PHP itself; you are going outside the program, where everything is more dependent on the OS.

This chapter mainly deals with a concept known as process creation, which is opening a new program to do your work. Whether this is achieved by using backticks to capture output into a variable or by the system and exec commands, process creation is the basis of interprocess communication.

We also do, however, discuss how to use PHP 4's exciting new features such as more integrated COM support and the integrated Java support.



PHP Developer's Cookbook
PHP Developers Cookbook (2nd Edition)
ISBN: 0672323257
EAN: 2147483647
Year: 2000
Pages: 351

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net