stream_socket_sendto()
function stream_socket_sendto(resource $socket, string $data, int $flags = 0, string $address = ''): mixed
Sends a message to a socket, whether it is connected or not.
Parameters:
$socket(resource)$data(string)$flags(int), default0, optional$address(string), default'', optional
Returns: mixed
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/filesystem/stream_socket_sendto.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how stream_socket_sendto is implemented in the compiler, see the internals page.