How can phpinfo() be used to check if Sockets Support is enabled in PHP?

To check if Sockets Support is enabled in PHP, you can use the phpinfo() function to display detailed information about your PHP configuration. Look for a section labeled "sockets" in the phpinfo() output. If Sockets Support is enabled, you should see relevant information about the sockets extension.

<?php
phpinfo();
?>