1--TEST--
2pcntl_unshare() with wrong flag
3--EXTENSIONS--
4pcntl
5posix
6--SKIPIF--
7<?php
8if (!function_exists("pcntl_unshare")) die("skip pcntl_unshare is not available");
9try {
10    if (@pcntl_unshare(42) == false && pcntl_get_last_error() == PCNTL_EPERM) {
11        die('skip Insufficient previleges');
12    }
13} catch (\ValueError $e) {}
14?>
15--FILE--
16<?php
17
18try {
19    pcntl_unshare(42);
20} catch (ValueError $exception) {
21    echo $exception->getMessage() . "\n";
22}
23
24?>
25--EXPECT--
26pcntl_unshare(): Argument #1 ($flags) must be a combination of CLONE_* flags
27