1--TEST--
2Bug #53427 + emulate_read (stream_select does not preserve keys)
3--FILE--
4<?php
5$read[1] = fopen(__FILE__, 'r');
6$read['myindex'] = reset($read);
7$write = NULL;
8$except = NULL;
9
10var_dump($read);
11stream_select($read, $write, $except, 0);
12var_dump($read);
13fread(reset($read), 1);
14stream_select($read, $write, $except, 0); // // emulate_read
15var_dump($read);
16?>
17--EXPECTF--
18array(2) {
19  [1]=>
20  resource(%d) of type (stream)
21  ["myindex"]=>
22  resource(%d) of type (stream)
23}
24array(2) {
25  [1]=>
26  resource(%d) of type (stream)
27  ["myindex"]=>
28  resource(%d) of type (stream)
29}
30array(2) {
31  [1]=>
32  resource(%d) of type (stream)
33  ["myindex"]=>
34  resource(%d) of type (stream)
35}
36