php8.5
Home/ Manual/ event / eventbase/ EventBase::getFeatures

EventBase::getFeatures

PHP function Edit on GitHub ✎

(PECL event >= 1.2.6-beta)

Returns bitmask of features supported

Description

EventBase::getFeatures(): int

Returns bitmask of features supported.

Parameters Parameters

Return Values

Returns integer representing a bitmask of supported features. See EventConfig::FEATURE_* constants.

Examples

EventBase::getFeatures() example

php
<?php
// Avoiding "select" method
$cfg = new EventConfig();
if ($cfg->avoidMethod("select")) {
    echo "'select' method avoided\n";
}

$base = new EventBase($cfg);

echo "Features:\n";
$features = $base->getFeatures();
($features & EventConfig::FEATURE_ET) and print "ET - edge-triggered IO\n";
($features & EventConfig::FEATURE_O1) and print "O1 - O(1) operation for adding/deleting events\n";
($features & EventConfig::FEATURE_FDS) and print "FDS - arbitrary file descriptor types, and not just sockets\n";
?>

See Also

  • EventBase::getMethod
  • EventConfig

Source: reference/event/eventbase/getfeatures.xml · from the official PHP manual (php/doc-en)