1--TEST--
2posix_getrlimit() for single resource
3--EXTENSIONS--
4posix
5--SKIPIF--
6<?php
7if (getenv('SKIP_REPEAT')) die('skip Not repeatable');
8if (!function_exists('posix_getrlimit')) die('skip posix_getrlimit() not found');
9if (!function_exists('posix_setrlimit') || !posix_setrlimit(POSIX_RLIMIT_CORE, 2048, -1)) {
10    die('skip Failed to set POSIX_RLIMIT_CORE');
11}
12?>
13--FILE--
14<?php
15
16posix_setrlimit(POSIX_RLIMIT_CORE, 2048, -1);
17[$hard, $soft] = posix_getrlimit(POSIX_RLIMIT_CORE);
18var_dump($hard, $soft);
19
20posix_setrlimit(POSIX_RLIMIT_CORE, 1024, 2048);
21[$hard, $soft] = posix_getrlimit(POSIX_RLIMIT_CORE);
22var_dump($hard, $soft);
23
24?>
25--EXPECT--
26int(2048)
27string(9) "unlimited"
28int(1024)
29int(2048)
30