International PHP Conference Munich 2025

socket_atmark

(PHP 8 >= 8.3.0, PHP 8)

socket_atmarkDetermines whether socket is at out-of-band mark

Description

socket_atmark(Socket $socket): bool

Determines whether socket is at out-of-band mark.

Parameters

socket

A Socket instance created with socket_create().

Return Values

Returns true on success or false on failure.

Examples

Example #1 Using socket_atmark() to set the source address

<?php
/ Create a new socket
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
var_dump(socket_atmark($sock));
/ Close
socket_close($sock);
?>

See Also

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant