EventBase::getFeatures

EventBase::getFeatures

(PECL event >= 1.2.6-beta)

EventBase::getFeaturesReturns bitmask of features supported

Description

public int EventBase::getFeatures ( void )

Returns bitmask of features supported.

Parameters

This function has no parameters.

Return Values

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

Examples

Example #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");
?>

See Also

© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/eventbase.getfeatures.php

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部