1--TEST--
2Test getrusage() function: basic test
3--SKIPIF--
4<?php if (!function_exists("getrusage")) print "skip"; ?>
5--FILE--
6<?php
7/* Prototype  :  array getrusage  ([ int $who  ] )
8 * Description: Gets the current resource usages
9 * Source code: ext/standard/microtime.c
10 * Alias to functions:
11 */
12
13echo "Simple testcase for getrusage() function\n";
14
15$dat = getrusage();
16
17if (!is_array($dat)) {
18	echo "TEST FAILED : getrusage should return an array\n";
19}
20
21// echo the fields which are common to all platforms
22echo "User time used (seconds) " . $dat["ru_utime.tv_sec"] . "\n";
23echo "User time used (microseconds) " . $dat["ru_utime.tv_usec"] . "\n";
24?>
25===DONE===
26--EXPECTF--
27Simple testcase for getrusage() function
28User time used (seconds) %d
29User time used (microseconds) %d
30===DONE===
31