Returns bitmask of features supported

EventBase::getFeatures

(PECL event >= 1.2.6-beta)

EventBase::getFeaturesReturns bitmask of features supported

說明

public EventBase::getFeatures(): int

Returns bitmask of features supported.

參數

此函式沒有參數。

返回值

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

範例

示例 #1 EventBase::getFeatures() example

<?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/deletting events\n");
(
$features EventConfig::FEATURE_FDS) and print("FDS - arbitrary file descriptor types, and not just sockets\n");
?>

參見

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *