1--TEST--
2SO_BPF_EXTENSIONS socket_getopt test
3--EXTENSIONS--
4sockets
5--SKIPIF--
6<?php
7if (!defined("SO_BPF_EXTENSIONS")) {
8    die("skip SO_BOF_EXTENSIONS");
9}
10?>
11--FILE--
12<?php
13$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
14if (!$socket) {
15    die('Unable to create AF_INET socket [socket]');
16}
17$flags = socket_getopt( $socket, SOL_SOCKET, SO_BPF_EXTENSIONS);
18if ($flags == false) die("socket_getopt");
19echo "extensions supported flag $flags";
20socket_close($socket);
21?>
22--EXPECTF--
23extensions supported flag %d
24