1--TEST--
2php://fd wrapper: bad syntax
3--FILE--
4<?php
5fopen("php://fd", "w");
6fopen("php://fd/", "w");
7fopen("php://fd/-2", "w");
8fopen("php://fd/1/", "w");
9
10echo "\nDone.\n";
11--EXPECTF--
12Warning: fopen(): Invalid php:// URL specified in %s on line %d
13
14Warning: fopen(php://fd): failed to open stream: operation failed in %s on line 2
15
16Warning: fopen(php://fd/): failed to open stream: php://fd/ stream must be specified in the form php://fd/<orig fd> in %s on line %d
17
18Warning: fopen(php://fd/-2): failed to open stream: The file descriptors must be non-negative numbers smaller than %d in %s on line %d
19
20Warning: fopen(php://fd/1/): failed to open stream: php://fd/ stream must be specified in the form php://fd/<orig fd> in %s on line %d
21
22Done.
23