Actually send a command to the server

protected function processArrayCommand(
  array $args,

assumes all appropriate prefixing and serialization has been preformed by the caller and constructs a Redis Protocol packet in the form:


Folled by N instances of:


Where L is the length in bytes of argument A.

So for the command GET somekey we'd serialize as:



  • $cmd
  • array $args