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 12--FILE-- 13<?php 14fopen("php://fd/12", "w"); 15 16echo "\nDone.\n"; 17--EXPECTF-- 18Warning: 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 19 20Done. 21