PHPackages                             flobee/spss - 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. [CLI &amp; Console](/categories/cli)
4. /
5. flobee/spss

ActiveLibrary[CLI &amp; Console](/categories/cli)

flobee/spss
===========

SPSS is a php-based implementation of IBM SPSS Statistics Standard. (Read/write SPSS, PSPP .sav files)

5.0.0(4y ago)1119.7k↓16.7%6[1 PRs](https://github.com/flobee/spss/pulls)1MITPHPPHP &gt;=5.6

Since Nov 20Pushed 1y ago2 watchersCompare

[ Source](https://github.com/flobee/spss)[ Packagist](https://packagist.org/packages/flobee/spss)[ Fund](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UFPH5MGUD7LS&source=url)[ RSS](/packages/flobee-spss/feed)WikiDiscussions stable Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (25)Used By (1)

SPSS / PSPP
===========

[](#spss--pspp)

project currently not maintained. Check github.com/tiamo/spss
-------------------------------------------------------------

[](#project-currently-not-maintained-check-githubcomtiamospss)

A PHP library for reading and writing SPSS / PSPP .sav data files.

VERSION 4.\* (see [upgrade section](#upgrade-to-version-3) for details)

[![Latest Stable Version](https://camo.githubusercontent.com/7f32ea50dfcfeb818c9ef29f567b38ba161850f749a6c8f4877fdfb1a224eb78/68747470733a2f2f706f7365722e707567782e6f72672f666c6f6265652f737073732f76)](//packagist.org/packages/flobee/spss)[![Stable Build Status](https://camo.githubusercontent.com/d3df265034ce7b10b65b7e6de9b17fb2414e017deaa052dfe53549d02a8e8944/68747470733a2f2f7472617669732d63692e636f6d2f666c6f6265652f737073732e7376673f6272616e63683d737461626c65)](https://travis-ci.com/flobee/spss/branches?stable)[![Latest Version on Packagist](https://camo.githubusercontent.com/cb110a182294481865b0f1138441ac32bb55c04b761490edec272f0cccf313d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c6f6265652f737073732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/flobee/spss)[![Total Downloads](https://camo.githubusercontent.com/dc5ab1c689e4b1cb2f7006c25e9de32d147ce91f8cc4ace27f97674fd7ce931c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666c6f6265652f737073732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/flobee/spss)[![Latest Unstable Version](https://camo.githubusercontent.com/ac073d2d278db7772fb629f9001b5dc23fcea33f9e16fc5753c291216885e2b2/68747470733a2f2f706f7365722e707567782e6f72672f666c6f6265652f737073732f762f756e737461626c65)](//packagist.org/packages/flobee/spss)[![Unstable Build Status](https://camo.githubusercontent.com/2c22273b5fd4cff5ff0b4e0cf144c6f7a09fa017e229933ad3cb765ac45efa88/68747470733a2f2f7472617669732d63692e636f6d2f666c6f6265652f737073732e7376673f6272616e63683d756e737461626c65)](https://travis-ci.com/flobee/spss/branches?unstable)

Fork of tiamo/spss. Mostly same code base. Introdusing a more complete test enviroment which now exists over there. So, one day i switch back to it.

**Table of contents**

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Demo/ Examples/ playground](#demo-examples-playground)
- [Tests / Developers](#tests--developers)
    - [Install using shell](#install-using-shell)
    - [Update existing code](#update-existing-code)
    - [Running tests](#running-tests)
    - [Upgrade to version 3.\*](#upgrade-to-version-3)
- [Changelog](#changelog)
- [License](#license)

Requirements
------------

[](#requirements)

PHP 8.0 and up.

- php-cli
- php-mdstring
- php-bcmath

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/)

Either run

```
composer require flobee/spss

```

to the require section of your `composer.json` file [see here](https://packagist.org/packages/flobee/spss)or download from [here](https://github.com/flobee/spss/releases).

Usage
-----

[](#usage)

In folder [examples/](/examples/) you will find some more examples.

Reader example:

```
$reader = \SPSS\Sav\Reader::fromFile('path/to/file.sav')->read();

```

or

```
$reader = \SPSS\Sav\Reader::fromString(file_get_contents('path/to/file.sav'))->read();

```

Writer example:

```
$writer = new \SPSS\Sav\Writer([
    'header' => [
            'prodName'     => '@(#) SPSS DATA FILE test',
            'layoutCode'   => 2,
            'compression'  => 1,
            'weightIndex'  => 0,
            'bias'         => 100,
            'creationDate' => '13 Feb 89',
            'creationTime' => '23:58:59',
    ],
    'variables' => [
        [
                'name'     => 'VAR1',
                'width'    => 0,
                'decimals' => 0
                'format'   => 5,
                'columns'  => 50,
                'align'    => 1,
                'measure'  => 1,
                'data'     => [
                    1, 2, 3
                ],
        ],
        ...
    ]
]);
...

```

Tests / Developers
------------------

[](#tests--developers)

### Install using shell

[](#install-using-shell)

```
git clone https://github.com/flobee/spss.git
cd spss/
git submodule init # once
git submodule update --recursive # upgrading (after a `git pull`)

```

Initialy or for upgrades to get development dependencies:

```
composer install

```

For more dev-tools you may install phpstan/phpstan `composer require -dev phpstan/phpstan`which shows a lot of stucture problems of the application and it should getting more attention (beginning with level=1).

### Update existing code

[](#update-existing-code)

```
git pull
git submodule update
composer install

```

### Running tests

[](#running-tests)

```
VERSION 4:
Improved additions for CI systems (e.g: jenkins) where `phing` is the
prefered build tool. `composer` the prefered package manager.

# shows you the options
./phing -l

# executes the tests
./phing test

# executes the tests and create the code coverage
./phing coverage

# run all tasks (CS checks, coverage, tests, sca...)
./phing all

...

cd tests
sh ./runTests.sh

# have a look at ../docs/CodeCoverage (use a browser after execution)
sh ./runTestsCoverageCreate.sh

# playground:
php readerDemo.php | less
# or to update tmp file to check for changes:
php readerDemo.php > data/pspp.sav.printr.txt

```

### Upgrade to version 3.\*

[](#upgrade-to-version-3)

Update your composer.json

```
{
    ...
    "require": {
        "flobee/spss": "3.*",
    },
    ...
}

```

Next:

```
composer update flobee/spss

```

Dependency Errors?

If you get dependency errors, you may upgrade other spss dependencies too. If so try the following:

```
composer update flobee/spss --with-dependencies

```

Changelog
---------

[](#changelog)

Please have a look in [docs/CHANGELOG.md](docs/CHANGELOG.md)

License
-------

[](#license)

Please have a look in [License text](LICENSE.md)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 55.6% 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 ~74 days

Recently: every ~28 days

Total

22

Last Release

1540d ago

Major Versions

2.1.5 → 3.1.42019-09-20

2.2.0 → 3.1.52020-09-08

2.2.2 → 4.0.0-beta12021-03-08

3.1.6 → 4.1.02022-02-25

3.1.7 → 5.0.02022-02-28

PHP version history (7 changes)2.0.0PHP 5.3.\* || 7.\*

3.0.0PHP 7.2.\*

2.1.0PHP &gt;=5.5

3.1.3PHP 7.2.\* || 7.3.\*

3.1.4PHP 7.3.\*

3.1.5PHP 7.2.\* || 7.3.\* || 7.4.\*

2.2.2PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/72171077fd1625e43e5bb8e96388ce24f60569969626958103bbad0c85c2bb55?d=identicon)[flobee](/maintainers/flobee)

---

Top Contributors

[![tiamo](https://avatars.githubusercontent.com/u/1963342?v=4)](https://github.com/tiamo "tiamo (99 commits)")[![flobee](https://avatars.githubusercontent.com/u/1349520?v=4)](https://github.com/flobee "flobee (47 commits)")[![lestcape](https://avatars.githubusercontent.com/u/43790722?v=4)](https://github.com/lestcape "lestcape (14 commits)")[![mennodekker](https://avatars.githubusercontent.com/u/922643?v=4)](https://github.com/mennodekker "mennodekker (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![blp](https://avatars.githubusercontent.com/u/613451?v=4)](https://github.com/blp "blp (1 commits)")[![zupolgec](https://avatars.githubusercontent.com/u/161318?v=4)](https://github.com/zupolgec "zupolgec (1 commits)")[![breakliu](https://avatars.githubusercontent.com/u/827020?v=4)](https://github.com/breakliu "breakliu (1 commits)")[![lukepot](https://avatars.githubusercontent.com/u/16059032?v=4)](https://github.com/lukepot "lukepot (1 commits)")[![pcholewasw](https://avatars.githubusercontent.com/u/79566577?v=4)](https://github.com/pcholewasw "pcholewasw (1 commits)")[![sakalauskas](https://avatars.githubusercontent.com/u/1455148?v=4)](https://github.com/sakalauskas "sakalauskas (1 commits)")

---

Tags

clicli-appparserphppsppspsscliwriterreaderstatisticsdatasetcli-appibmspssporsavpspp

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/flobee-spss/health.svg)

```
[![Health](https://phpackages.com/badges/flobee-spss/health.svg)](https://phpackages.com/packages/flobee-spss)
```

###  Alternatives

[tiamo/spss

SPSS is a php-based implementation of IBM SPSS Statistics Standard

78294.6k2](/packages/tiamo-spss)[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B11.3k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M286](/packages/nunomaduro-termwind)[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[wp-cli/php-cli-tools

Console utilities for PHP

68325.0M367](/packages/wp-cli-php-cli-tools)

PHPackages © 2026

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