(PHP 8 >= 8.6.0)
Io\Poll\Backend::getAvailableBackends — Returns the backends available on the platform
Returns the backends an Io\Poll\Context can be created with on the current platform.
Cette fonction ne contient aucun paramètre.
Returns a list of Io\Poll\Backend cases.
Io\Poll\Backend::Auto is never part of it.
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