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?>
12--EXPECTF--
13Warning: fopen(): Invalid php:// URL specified in %s on line %d
14
15Warning: fopen(php://fd): Failed to open stream: operation failed in %s on line 2
16
17Warning: 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
18
19Warning: fopen(php://fd/-2): Failed to open stream: The file descriptors must be non-negative numbers smaller than %d in %s on line %d
20
21Warning: 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
22
23Done.
24