8000 PHP command for knowing what version of phpredis ? · Issue #2 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content

PHP command for knowing what version of phpredis ? #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CloudMarc opened this issue Mar 31, 2011 · 4 comments
Closed

PHP command for knowing what version of phpredis ? #2

CloudMarc opened this issue Mar 31, 2011 · 4 comments
Labels

Comments

@CloudMarc
Copy link

Is there a php command for finding out what version of phpredis is being used, so that I can check from within scripts?

@nicolasff
Copy link
Member

Hello,

You can use phpinfo() for this. Try also phpversion('redis'), although I'm not sure it works.

Nicolas

@bigfg bigfg mentioned this issue Aug 9, 2016
@liupdhc liupdhc mentioned this issue Apr 12, 2017
@appel
Copy link
appel commented Nov 15, 2021

At ten years old this is certainly the oldest thread I ever resurrected, my apologies. To whomever wanders in here from Google (like I did), the following will output an array of information on the server, including redis_version:

$info = $redis->info("server");
var_dump($info);

More details here:
https://redis.io/commands/info

Another way:

echo phpversion('redis');

@shradhabanerjee
Copy link

php -i | grep Redis

@michael-grunder
Copy link
Member

Also you can do this

php --ri redis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants
0