xref: /PHP-8.3/ext/sockets/tests/bug63000.phpt (revision 74859783)
1--TEST--
2Bug #63000: Multicast on OSX
3--EXTENSIONS--
4sockets
5--SKIPIF--
6<?php
7
8if (str_contains(PHP_OS, 'FreeBSD')) {
9    die('skip option not supported on FreeBSD');
10}
11--FILE--
12<?php
13$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
14socket_bind($socket, '0.0.0.0', 31057);
15
16$so = socket_set_option($socket, IPPROTO_IP, MCAST_JOIN_GROUP, array(
17    "group" => '224.0.0.251',
18    "interface" => 0,
19));
20var_dump($so);
21?>
22--EXPECT--
23bool(true)
24