1--TEST--
2Bug #49936 (crash with ftp stream in php_stream_context_get_option())
3--SKIPIF--
4<?php
5if( substr(PHP_OS, 0, 3) != "WIN" )
6  die("skip. Do run on Windows only");
7?>
8--INI--
9default_socket_timeout=2
10--FILE--
11<?php
12
13$dir = 'ftp://your:self@localhost/';
14
15var_dump(opendir($dir));
16var_dump(opendir($dir));
17
18?>
19--EXPECTF--
20Warning: opendir(): connect() failed: %s
21 in %s on line %d
22
23Warning: opendir(ftp://...@localhost/): failed to open dir: operation failed in %s on line %d
24bool(false)
25
26Warning: opendir(): connect() failed: %s
27 in %s on line %d
28
29Warning: opendir(ftp://...@localhost/): failed to open dir: operation failed in %s on line %d
30bool(false)
31