1--TEST--
2php://fd wrapper: invalid file descriptor
3--SKIPIF--
4<?php include('skipif.inc');
5if(substr(PHP_OS, 0, 3) == "WIN")
6	die("skip Not for Windows");
7
8//we'd need a release and a test variation for windows, because in debug builds we get this message:
9//Warning: Invalid parameter detected in CRT function '_dup' (f:\dd\vctools\crt_bld\self_x86\crt\src\dup.c:52)
10//I greped the CRT sources and found no function capable of validating a file descriptor
11--FILE--
12<?php
13fopen("php://fd/12", "w");
14
15echo "\nDone.\n";
16--EXPECTF--
17Warning: fopen(php://fd/12): failed to open stream: Error duping file descriptor 12; possibly it doesn't exist: [9]: %s in %s on line %d
18
19Done.
20