All Projects → nrk → Phpiredis

nrk / Phpiredis

Licence: bsd-2-clause
PHP extension for Redis based on Hiredis

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Phpiredis

Bdp Dataplatform
大数据生态解决方案数据平台:基于大数据、数据平台、微服务、机器学习、商城、自动化运维、DevOps、容器部署平台、数据平台采集、数据平台存储、数据平台计算、数据平台开发、数据平台应用搭建的大数据解决方案。
Stars: ✭ 456 (-5%)
Mutual labels:  redis
Invenio
Invenio digital library framework
Stars: ✭ 469 (-2.29%)
Mutual labels:  redis
Gofamily
🔥 大厂 BAT 面试高频知识点,后端技术体系。包含了 C GO Python, 网络,Redis ,MySQL ,消息队列 ,高并发,微服务,缓存,操作系统,算法,LeetCode 刷题等知识
Stars: ✭ 474 (-1.25%)
Mutual labels:  redis
Api Boot
“ ApiBoot”是为接口服务而生的,基于“ SpringBoot”完成扩展和自动配置,内部封装了一系列的开箱即用Starters。
Stars: ✭ 460 (-4.17%)
Mutual labels:  redis
Redisfullcheck
redis-full-check is used to compare whether two redis have the same data. redis-full-check用于比较2个redis数据是否一致,支持单节点、主从、集群版、以及多种proxy,支持同构以及异构对比,redis的版本支持2.x-5.x。
Stars: ✭ 463 (-3.54%)
Mutual labels:  redis
Kvrocks
the kvrocks(kv-rocks) is SSD NoSQL which based on rocksdb, and compatible with the Redis protocol, intention to decrease the cost of memory and increase the capability
Stars: ✭ 471 (-1.87%)
Mutual labels:  redis
Redis source annotation
redis 3.2.8 的源码注释
Stars: ✭ 452 (-5.83%)
Mutual labels:  redis
Jobs
A persistent and flexible background jobs library for go.
Stars: ✭ 479 (-0.21%)
Mutual labels:  redis
Redislite
Redis in a python module.
Stars: ✭ 464 (-3.33%)
Mutual labels:  redis
Groupco
PHP的服务化框架。适用于Api、Http Server、Rpc Server;帮助原生PHP项目转向微服务化。出色的性能与支持高并发的协程相结合
Stars: ✭ 473 (-1.46%)
Mutual labels:  redis
Testcontainers Spring Boot
Container auto-configurations for spring-boot based integration tests
Stars: ✭ 460 (-4.17%)
Mutual labels:  redis
Nohm
node.js object relations mapper (orm) for redis
Stars: ✭ 462 (-3.75%)
Mutual labels:  redis
Uexam
学之思在线考试系统,支持多种题型:选择题、多选题、判断题、填空题、解答题以及数学公式,包含PC端、小程序端,扩展性强,部署方便、界面设计友好、代码结构清晰
Stars: ✭ 473 (-1.46%)
Mutual labels:  redis
Onemall
芋道 mall 商城,基于微服务的思想,构建在 B2C 电商场景下的项目实战。核心技术栈,是 Spring Boot + Dubbo 。未来,会重构成 Spring Cloud Alibaba 。
Stars: ✭ 5,312 (+1006.67%)
Mutual labels:  redis
Pdf
编程电子书,电子书,编程书籍,包括C,C#,Docker,Elasticsearch,Git,Hadoop,HeadFirst,Java,Javascript,jvm,Kafka,Linux,Maven,MongoDB,MyBatis,MySQL,Netty,Nginx,Python,RabbitMQ,Redis,Scala,Solr,Spark,Spring,SpringBoot,SpringCloud,TCPIP,Tomcat,Zookeeper,人工智能,大数据类,并发编程,数据库类,数据挖掘,新面试题,架构设计,算法系列,计算机类,设计模式,软件测试,重构优化,等更多分类
Stars: ✭ 12,009 (+2401.88%)
Mutual labels:  redis
Elasticell
Elastic Key-Value Storage With Strong Consistency and Reliability
Stars: ✭ 453 (-5.62%)
Mutual labels:  redis
Gobackup
🗄 Simple tool for backup your databases, files to FTP / SCP / S3 storages.
Stars: ✭ 472 (-1.67%)
Mutual labels:  redis
Memtier benchmark
NoSQL Redis and Memcache traffic generation and benchmarking tool.
Stars: ✭ 480 (+0%)
Mutual labels:  redis
Django Redis Sessions
Session backend for Django that stores sessions in a Redis database
Stars: ✭ 478 (-0.42%)
Mutual labels:  redis
Skyeye
智能办公OA系统[SpringBoot2-快速开发平台],适用于医院,学校,中小型企业等机构的管理。Activiti5.22+动态表单实现零java代码即可做到复杂业务的流程实施,同时包含文件在线操作、日志、考勤、CRM、ERP进销存、项目、拖拽式生成问卷、日程、笔记、计划、行政等多种复杂业务功能。同时,可进行授权二开。
Stars: ✭ 472 (-1.67%)
Mutual labels:  redis

Phpiredis

Software license Build status

Phpiredis is an extension for PHP 5.x to 8.x based on hiredis that provides a simple and efficient client for Redis and a fast incremental parser / serializer for the RESP protocol.

Installation

Building and using this extension requires hiredis (>=0.14, >=1.0) to be installed on the system. hiredis is usually available in the repositories of most Linux distributions, alternatively it is possible to build it by fetching the code from its repository.

git clone https://github.com/nrk/phpiredis.git
cd phpiredis
phpize && ./configure --enable-phpiredis
make && make install

When the configuration script is unable to locate hiredis on your system, you can specify in which directory it can be found using --with-hiredis-dir= (e.g. --with-hiredis-dir=/usr/local).

Phpiredis provides a basic test suite that can be launched with make test. Tests require a running instance of redis-server listening on 127.0.0.1:6379 but make sure that your server does not hold data you are interested: you could end up losing everything stored on it!

If you notice a failing test or a bug, you can contribute by opening a pull request on GitHub or simply file a bug on our issue tracker.

Usage

Connecting to Redis is as simple as calling the phpiredis_connect() function with a server address as the first parameter and an optional port number when the server is listening to a different port than the default 6379:

$redis = phpiredis_connect('127.0.0.1', 6379);      // normal connection
$redis = phpiredis_pconnect('127.0.0.1', 6379);     // persistent connection

Alternatively you can connect to redis using UNIX domain socket connections.

$redis = phpiredis_connect('/tmp/redis.sock');      // normal connection
$redis = phpiredis_pconnect('/tmp/redis.sock');     // persistent connection

Once the connection is established, you can send commands to Redis using phpiredis_command_bs() or pipeline them using phpiredis_multi_command_bs():

$response = phpiredis_command_bs($redis, array('DEL', 'test'));

$response = phpiredis_multi_command_bs($redis, array(
    array('SET', 'test', '1'),
    array('GET', 'test'),
));

The _bs suffix indicates that these functions can handle binary key names or values by using the unified Redis protocol available since Redis >= 1.2.

Commands can still be sent using the old and deprecated inline protocol using phpiredis_command() and phpiredis_multi_command() (note the lack of the _bs suffix) but it's highly discouraged and these functions will be removed in future versions of phpiredis.

$response = phpiredis_command($redis, 'DEL test');

$response = phpiredis_multi_command($redis, array(
    'SET test 1',
    'GET test',
));

Contributing

Any kind of contribution is extremely welcome! Just fork the project on GitHub, work on new features or bug fixes using feature branches and open pull-requests with concise but complete descriptions of your changes. If you are unsure about a proposal, you can just open an issue to discuss it before writing actual code.

Authors

Daniele Alessandri (current maintainer) Sebastian Waisbrot (original developer)

License

The code for phpiredis is distributed under the terms of the BSD license (see LICENSE).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].