(PHP 5, PHP 7, PHP 8)
stream_get_transports — Retrieve list of registered socket transports
stream_get_transports(): array
Returns an indexed array containing the name of all socket transports available on the running system.
This function has no parameters.
Returns an indexed array of socket transports names.
Example #1 Using stream_get_transports()
<?php $xportlist = stream_get_transports(); print_r($xportlist); ?>
The above example will output something similar to:
Array ( [0] => tcp [1] => udp [2] => unix [3] => udg )
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.stream-get-transports.php