Skip to Content
Mastering PHP 7
book

Mastering PHP 7

by Branko Ajzele
June 2017
Intermediate to advanced
536 pages
9h 49m
English
Packt Publishing
Content preview from Mastering PHP 7

Multiprocessing

When speaking of multiprocessing, we often come across two seemingly colliding terms: process and thread. Where the process can be thought of as a currently running instance of an application, a thread is a path of execution within a process. A thread can do pretty much anything a process can do. However, given that threads reside within the process, we look at them as a solution for lightweight tasks, or at least tasks lighter than those employed by a process.

The PHP language leaves a lot to be desired in terms of multiprocessing/multithreading. The following two stand out as the most popular solutions:

  • pcntl_fork(): This is a function that forks the currently running process
  • pthreads: This is an object-orientated API that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning PHP 7

Learning PHP 7

Antonio L Zapata (GBP)
Upgrading to PHP 5

Upgrading to PHP 5

Adam Trachtenberg

Publisher Resources

ISBN: 9781785882814Supplemental Content