mirror of
https://github.com/php-win-ext/phpredis.git
synced 2026-03-26 18:12:19 +01:00
Added distribution option to RedisCluster in preperation for implementation of commands which can be distributed by the client. The two distribution modes will be: * DIST_OOE : Maintain order of execution * DIST_SPEED : Most efficient delivery Either way, the RedisCluster object will need to return values that were gathered in the same way they were sent in, but might execute them in a different order if the option is set to DIST_SPEED.
26 lines
522 B
PHP
26 lines
522 B
PHP
<?php
|
|
$arr = explode("\n",file_get_contents("redis.c"));
|
|
$idx = [];
|
|
|
|
foreach($arr as $str) {
|
|
if(strpos($str, "zend_parse_method_parameters")!==false) {
|
|
$start = strpos($str, '"O');
|
|
$str = substr($str, $start+1);
|
|
$end = strpos($str, '"');
|
|
$str = substr($str, 0, $end);
|
|
|
|
if(!isset($idx[$str])) {
|
|
$idx[$str]=1;
|
|
} else {
|
|
$idx[$str]++;
|
|
}
|
|
}
|
|
}
|
|
|
|
arsort($idx);
|
|
|
|
foreach($idx as $proto => $count) {
|
|
echo $proto . "\t" . $count . "\n";
|
|
}
|
|
?>
|