1--TEST--
2Check for #14
3--FILE--
4<?php
5$loop = uv_default_loop();
6$filename ="does_not_exist.txt";
7uv_fs_stat($loop, $filename, function ($stat) use ($loop) {
8	if (is_long($stat) && $stat < 0) {
9		echo 'OK' . PHP_EOL;
10	} else {
11		echo "FAILED: uv_fs_stat should have returned an array with values" . PHP_EOL;
12	}
13
14	$filename = tempnam(sys_get_temp_dir(), 'test-no14');
15
16	uv_fs_stat($loop, $filename, function ($stat) {
17		if (is_array($stat) || !$stat) {
18			echo 'OK' . PHP_EOL;
19		} else {
20			echo "FAILED: uv_fs_stat should have returned an array with values" . PHP_EOL;
21		}
22	});
23
24});
25
26uv_run();
27
28--EXPECT--
29OK
30OK
31