PHPackages                             ghola/rserve-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ghola/rserve-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ghola/rserve-php
================

Rserve client library for PHP

2.0.0(9y ago)06.0kPHPPHP &gt;=5.2.0

Since Apr 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ghola/rserve-php)[ Packagist](https://packagist.org/packages/ghola/rserve-php)[ Docs](https://github.com/cturbelin/rserve-php)[ RSS](/packages/ghola-rserve-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (4)Used By (0)

Rserve-php
==========

[](#rserve-php)

php5 client for Rserve  (a TCP/IP server for R statistical software)

Changes from 1.0 version
------------------------

[](#changes-from-10-version)

- All classes are declared under Sentiweb\\Rserve namespace allowing PSR-4 autoloading
- Parsers are now individualized into classes
- A Parser instance can be directly used as second argument of evalString() to replace default parser (see example)

Tests
-----

[](#tests)

You can run tests using phpunit

- Create a file config.php in the "tests" directory (copy config.php.sample)
- define the constant RSERVE\_HOST with the address of your Rserve server (custom port not supported yet)
- run tests . phpunit --bootstrap=src/autoload.php tests/ParserNativeTest.php . phpunit tests\\SessionTest.php . phpunit tests\\REXPTest.php
- define the constants RSERVE\_PORT, RSERVE\_USER, RSERVE\_PASS to config.php (along with RSERVE\_HOST)
- run test . phpunit tests\\LoginTest.php

Installation
------------

[](#installation)

Using without composer : include src/autoload.php in your project

Using with composer: composer require cturbelin/rserve-php

Some usage examples are provided in example/ directory

Using Login Authorization
-------------------------

[](#using-login-authorization)

Usage is the same as the vanilla usage, except for the constructor $cnx = new Connection('myserverhost', serverport, array('username'=&gt;username,'password'=&gt;password))

Parsers
-------

[](#parsers)

Results provided by R could be handled using several parsers

- NativeArray Translates R structure into php simple arrays. It is useful to get simple values from R
- Wrapped array Using NativeArray with parameter \["wrapper"=&gt;true\] in contructor returns object with attributes of R objects. The result object can be used as an array and provides methods to access R object attributes
- Debug Translates R response to structure useful for debugging
- REXP Translates R response into REXP classes

Async Mode
----------

[](#async-mode)

Several functions allow to use connection in async mode

- getSocket() to get the socket an set some options
- setAsync() allow to set the async mode
- getResults($parser) : get and parse the results after a call to evalString() in async mode

Contacts
--------

[](#contacts)

Clément Turbelin, Université Pierre et Marie Curie - Paris 6, France

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 93% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~165 days

Total

3

Last Release

3388d ago

Major Versions

v1.0 → 2.0.x-dev2017-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/894f192fe28d2f89216903bbee6fc482b1bb2493f288757c222539a43bca65ec?d=identicon)[ghola](/maintainers/ghola)

---

Top Contributors

[![cturbelin](https://avatars.githubusercontent.com/u/1282776?v=4)](https://github.com/cturbelin "cturbelin (66 commits)")[![ghola](https://avatars.githubusercontent.com/u/932205?v=4)](https://github.com/ghola "ghola (2 commits)")[![shadiakiki1986](https://avatars.githubusercontent.com/u/8392324?v=4)](https://github.com/shadiakiki1986 "shadiakiki1986 (2 commits)")[![rathivivek](https://avatars.githubusercontent.com/u/9977079?v=4)](https://github.com/rathivivek "rathivivek (1 commits)")

---

Tags

statsrRserve

### Embed Badge

![Health badge](/badges/ghola-rserve-php/health.svg)

```
[![Health](https://phpackages.com/badges/ghola-rserve-php/health.svg)](https://phpackages.com/packages/ghola-rserve-php)
```

###  Alternatives

[wnx/laravel-stats

Get insights about your Laravel Project

1.7k1.8M7](/packages/wnx-laravel-stats)[cturbelin/rserve-php

Rserve client library for PHP

4435.0k](/packages/cturbelin-rserve-php)[richjenks/stats

Statistics library for non-statistical people

23152.6k1](/packages/richjenks-stats)[magirc/magirc

MagIRC - Let the magirc begin!

371.1k](/packages/magirc-magirc)[beebmx/kirby-x-ray

X-Ray provides a comprehensive overview of the content present on your site and individual pages, allowing you to inspect and evaluate them at a glance.

121.1k](/packages/beebmx-kirby-x-ray)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
