Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Worker::getStackedWorker::shutdown>
^WorkerLast updated: Mon, 26 Oct 2026

Worker::isShutdown

(PECL pthreads >= 2.0.0)

Worker::isShutdown — State Detection

Description

public function Worker::isShutdown(): bool

Whether the worker has been shutdown or not.

Parameters

This function has no parameters.

Return Values

Returns whether the worker has been shutdown or not.

Examples

Example #1 Detect the state of a worker

<?php
$worker = new Worker();
$worker->start();

var_dump($worker->isShutdown());

$worker->shutdown();

var_dump($worker->isShutdown());

The above example will output:

bool(false)
bool(true)

<Worker::getStackedWorker::shutdown>
^WorkerLast updated: Mon, 26 Oct 2026