Last active
July 25, 2025 16:50
-
-
Save tillkruss/86b61eab32fbf352a0b1e92ba4c0a3ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = "redis-vanilla-0"; | |
$port = 26379; | |
var_dump("phpredis", phpversion('redis')); | |
try { | |
$redis = new Redis([ | |
'host' => $host, | |
'port' => $port, | |
// 'auth' => 'secret', | |
]); | |
$ping = $redis->ping(); | |
var_dump("client", $ping); | |
} catch (Throwable $th) { | |
var_dump("client error", $th); | |
} | |
try { | |
$sentinel = new RedisSentinel([ | |
'host' => $host, | |
'port' => $port, | |
// 'auth' => 'secret', | |
]); | |
$ping = $sentinel->ping(); | |
var_dump("sentinel", $ping); | |
$masters = $sentinel->masters(); | |
var_dump("masters", $masters); | |
} catch (Throwable $th) { | |
var_dump("sentinel error", $th); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment