Bug #53427 [Opn->Asn]: Stream array keys lost on stream_select

From: Date: Tue, 30 Nov 2010 12:38:37 +0000
Subject: Bug #53427 [Opn->Asn]: Stream array keys lost on stream_select
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156585@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53427&edit=1

 ID:                 53427
 Updated by:         cataphract@php.net
 Reported by:        tudoadtedoadrb at gmail dot com
 Summary:            Stream array keys lost on stream_select
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            Streams related
 Operating System:   Windows XP SP3
 PHP Version:        5.3.3
-Assigned To:        
+Assigned To:        cataphract
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2010-11-30 13:30:15] tudoadtedoadrb at gmail dot com

Description:
------------
When you pass a keyed array of streams into stream_select the keys are
lost.

The behaviour I am seeing is similar to the socket_select bug 44197.

Test script:
---------------
<?php
$read["myindex"] = $mystream;
$write = NULL;
$except = NULL;

var_dump($read);

stream_select($read, $write, $except, 0);

var_dump($read);

?> 


Expected result:
----------------
Assuming $mystream changes status and there is data available for
reading...

array(1) {
  ["myindex"]=>
  resource(11) of type (stream)
}
array(1) {
  ["myindex"]=>
  resource(11) of type (stream)
}

Actual result:
--------------
array(1) {
  ["myindex"]=>
  resource(11) of type (stream)
}
array(1) {
  [0]=>
  resource(11) of type (stream)
}


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53427&edit=1


Thread (3 messages)

« previous php.bugs (#156585) next »