phpday 2027 - Call for Papers

Io\Poll\Backend::getAvailableBackends

(PHP 8 >= 8.6.0)

Io\Poll\Backend::getAvailableBackends — Returns the backends available on the platform

Description

public static function Io\Poll\Backend::getAvailableBackends(): array

Returns the backends an Io\Poll\Context can be created with on the current platform.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Returns a list of Io\Poll\Backend cases. Io\Poll\Backend::Auto is never part of it.

Exemples

Exemple #1 Io\Poll\Backend::getAvailableBackends() example

<?php
use Io\Poll\Backend;

foreach (Backend::getAvailableBackends() as $backend) {
    echo $backend->name, PHP_EOL;
}

Résultat de l'exemple ci-dessus est similaire à :

Poll
Epoll

Voir aussi

+add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top