a compatibility code of php redis