stream_get_transports
(PHP 5, PHP 7, PHP 8)
stream_get_transports — 获取已注册的套接字传输协议列表
说明
stream_get_transports(): array
返回一个包含当前运行系统中所有套接字传输协议名称的索引数组。
参数
此函数没有参数。
返回值
返回一个套接字传输协议名称的索引数组。
范例
示例 #1 使用 stream_get_transports()
<?php
$xportlist = stream_get_transports();
print_r($xportlist);
?>
以上例程的输出类似于:
Array ( [0] => tcp [1] => udp [2] => unix [3] => udg )
参见
- stream_get_filters() - 获取已注册的数据流过滤器列表
- stream_get_wrappers() - 获取已注册的流类型

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/function.stream-get-transports.php