PHP Using Redis with PHP
Connecting to a Redis instance
Assuming a default server running on localhost with the default port, the command to connect to that Redis server would be:
Installing PHP Redis on Ubuntu
To install PHP on Ubuntu, first install the Redis server:
Executing Redis commands in PHP
The Redis PHP module gives access to the same commands as the Redis CLI client so it is quite straightforward to use.
The syntax is as follow: