xref: /PHP-7.0/ext/sockets/tests/bug63000.phpt (revision 188c124a)
1--TEST--
2Bug #63000: Multicast on OSX
3--SKIPIF--
4<?php
5if (!extension_loaded('sockets')) {
6    die('skip sockets extension not available.');
7}
8if (PHP_OS !== 'Darwin') {
9    die('is not OSX.');
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--EXPECTF--
22bool(true)
23