Installation

On this page

Requirements

  • Every package supports PHP 8.3, 8.4, and 8.5. CmdStanPHP also supports PHP 8.2.
  • Composer installs the PHP libraries from Packagist.
  • PIE installs the phit and phpolars extensions.

phibble

Requires: mbstring extension, PDO extension

Install
composer require phpstats/phibble

Full installation guide →

phplyr

Requires: phibble (installed by Composer), PDO extension, mbstring extension

Install
composer require phpstats/phplyr

Full installation guide →

phpolars

Requires: PIE, NTS (non-thread-safe) PHP

To build from source: Rust toolchain, libclang

Install
pie install phpstats/phpolars
Verify
php -r 'echo phpversion("php_polars"), PHP_EOL;'

Prints the installed version. PHP-FPM reads its own php.ini, so enable the extension there and restart FPM.

Full installation guide →

juphyter

Requires: mbstring and tokenizer PHP extensions, Composer, Python 3 with the venv module

Install
composer global require phpstats/juphyter
composer global exec juphyter -- install --create-venv ~/.venvs/juphyter
Verify
composer global exec juphyter -- doctor

Checks kernel readiness and optional Quarto support.

Full installation guide →

phit

Requires: PIE, unzip or the PHP zip extension, NTS (non-thread-safe) PHP

To build from source: Rust toolchain, Clang and libclang, PHP development files (phpize and php-config), autoconf and make

Install
pie install phpstats/phit
Verify
php -r 'echo phpversion("phit"), PHP_EOL;'

Prints the installed version. PHP-FPM reads its own php.ini, so enable the extension there and restart FPM.

Full installation guide →

phiz

Install
composer require phpstats/phiz

Full installation guide →

CmdStanPHP

Requires: JSON extension, proc_open() enabled, CmdStan 2.37 or later

To compile models: make, C++ compiler supported by CmdStan

Install
composer require phpstats/cmdstanphp

Full installation guide →