Documentation regarding return types is incorrect
Author: thepurpleblobCreated Jul 23, 2025Updated Mar 23, 2026
Labelsdocumentation
For example...
ZRangeByScore... README says...
Return value Array containing the values in specified range.
However, the declaration disagrees...
public function zRangeByScore(string $key, string $start, string $end, array $options = []): Redis|array|false;
Which says that return types can be Redis, array or false.
This may seem trivial, but if you take the documentation at its word when using the extension it's asking for run time type errors.
I would have thought there are (many?) other instances but this is the one that I came across.
Source: phpredis/phpredis