1--TEST--
2php://fd wrapper: invalid file descriptor
3--SKIPIF--
4<?php
5// At least on Mac 10.14 Mojave; not sure about older versions
6if (strtolower(PHP_OS) == 'darwin') die('skip: the warning output is different on MacOS');
7?>
8--FILE--
9<?php
10fopen("php://fd/1023", "w");
11
12echo "\nDone.\n";
13?>
14--EXPECTF--
15Warning: fopen(php://fd/1023): Failed to open stream: Error duping file descriptor 1023; possibly it doesn't exist: [9]: %s in %s on line %d
16
17Done.
18