|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-03-11 03:51 UTC] admin at mrmunk dot dk
Description: ------------ I'd like to have a function that can tell me how many sessions are initiated Something like: wincache_session_count ? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Jan 08 16:00:02 2026 UTC |
This code should do exactly what you want: <?php function wincache_session_count( ) { $ucache_info = wincache_ucache_info(); $count = 0; foreach ( $ucache_info['ucache_entries'] as $entry ) { if ( $entry['is_session'] ) $count++; } return $count; } ?> You can use the above function till we decide on this feature request. If you can provide some context behind usefulness of the API you are asking for, it will be a good data point in our triage meeting.