- function_exists: documentation ( source)
<?php
echo "socket extension: ", function_exists("socket_create"), "\n";
echo "socket_import_stream: ", function_exists("socket_import_stream"), "\n";
echo "SOL_SOCKET: ", defined("SOL_SOCKET"), "\n";
echo "SO_KEEPALIVE: ", defined("SO_KEEPALIVE"), "\n";