Req #53100 [Com]: Add function to list available vars

From: Date: Wed, 27 Oct 2010 21:12:46 +0000
Subject: Req #53100 [Com]: Add function to list available vars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-155583@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53100&edit=1

 ID:                 53100
 Comment by:         marc-bennewitz at arcor dot de
 Reported by:        marc-bennewitz at arcor dot de
 Summary:            Add function to list available vars
 Status:             Open
 Type:               Feature/Change Request
 Package:            Semaphore related
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

patch:
- added function shm_get_vars(resource $id) to get an associative array
of all variable keys and values
- added function shm_list_vars(resource $id) to get an indexed array of
all keys


Previous Comments:
------------------------------------------------------------------------
[2010-10-18 21:53:58] marc-bennewitz at arcor dot de

Description:
------------
It's not possible to get a list of available vars.

Test script:
---------------
shm_put_var($shm, 123, 'one');
ahm_put_var($shm, 456, 'two');
var_dump(shm_list_vars($shm));

Expected result:
----------------
array(2) {
  [0]=>
  int(123)
  [1]=>
  int(456)
}
*or*
array(2) {
  [123]=>
  string(3)"one"
  [456]=>
  string(3)"two"
}

Actual result:
--------------
PHP Fatal error:  Call to undefined function shm_list_vars() in ...


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



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


Thread (4 messages)

« previous php.bugs (#155583) next »