1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 14:31:06 +02:00
Files
archived-php-src/ext/standard/tests/file/php_fd_wrapper_03.phpt
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00

24 lines
750 B
PHP

--TEST--
php://fd wrapper: bad syntax
--FILE--
<?php
fopen("php://fd", "w");
fopen("php://fd/", "w");
fopen("php://fd/-2", "w");
fopen("php://fd/1/", "w");
echo "\nDone.\n";
?>
--EXPECTF--
Warning: fopen(): Invalid php:// URL specified in %s on line %d
Warning: fopen(php://fd): Failed to open stream: operation failed in %s on line 2
Warning: 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
Warning: fopen(php://fd/-2): Failed to open stream: The file descriptors must be non-negative numbers smaller than %d in %s on line %d
Warning: 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
Done.