PHP Using Redis with PHP Connecting to a Redis instance

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Assuming a default server running on localhost with the default port, the command to connect to that Redis server would be:

$redis = new Redis();
$redis->connect('127.0.0.1', 6379);


Got any PHP Question?