Skip to content

Installation

github-actions[bot] edited this page Oct 5, 2026 · 2 revisions

Installation

Requirements

  • PHP 7.4 or newer (tested on 7.4 through 8.5)
  • The json extension

Composer

composer require uuur86/strobj:^3.0

Applications that still need the 2.x line can require uuur86/strobj:^2.1; see Migration from 2.1 before upgrading.

Autoloading

Composer's autoloader registers the StrObj\ namespace:

require __DIR__ . '/vendor/autoload.php';

use StrObj\StringObjects;

Verifying the installation

$data = StringObjects::instance(['status' => 'ok']);
echo $data->get('status'); // ok

Next: Getting Started.

Clone this wiki locally