koriym/printo

An object graph visualizer.

Maintainers

๐Ÿ‘ koriym

Package info

github.com/koriym/print_o

pkg:composer/koriym/printo

Statistics

Installs: 2โ€‰021โ€‰042

Dependents: 2

Suggesters: 0

Stars: 142

Open Issues: 0

1.1.0 2026-01-14 15:43 UTC

Requires

  • php: >=5.4.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT ec7a5196e165b7d96a127fc3a8925eef8892e3f2

  • Akihito Koriyama <akihito.koriyama.woop@gmail.com>

debugvar_dump

This package is auto-updated.

Last update: 2026-06-14 16:38:39 UTC


README

An object graph visualizer for PHP

print_o visualizes PHP object graphs as interactive diagrams, making it easy to understand complex object relationships in your application.

Features

  • Visual representation of object relationships
  • Interactive graph with configurable properties
  • Support for different visualization ranges (objects only, with properties, or full details)

Quick Start

print_o($object);

๐Ÿ‘ object graph

What is object graph ?

Object-oriented applications contain complex webs of interrelated objects. Objects are linked to each other by one object either owning or containing another object or holding a reference to another object. This web of objects is called an object graph and it is the more abstract structure that can be used in discussing an application's state. - wikipedia

(JA) ใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆๆŒ‡ๅ‘ใฎใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฏ็›ธไบ’ใซ้–ขไฟ‚ใฎใ‚ใ‚‹่ค‡้›‘ใชใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆ็ถฒใ‚’ๅซใ‚“ใงใ„ใพใ™ใ€‚ใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆใฏใ‚ใ‚‹ใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆใ‹ใ‚‰ๆ‰€ๆœ‰ใ•ใ‚Œใฆใ„ใ‚‹ใ‹ใ€ไป–ใฎใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆ๏ผˆใพใŸใฏใใฎใƒชใƒ•ใ‚กใƒฌใƒณใ‚น๏ผ‰ใ‚’ๅซใ‚“ใงใ„ใ‚‹ใ‹ใ€ใใฎใฉใกใ‚‰ใ‹ใงใŠไบ’ใ„ใซๆŽฅ็ถšใ•ใ‚Œใฆใ„ใพใ™ใ€‚ใ“ใฎใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆ็ถฒใ‚’ใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆใ‚ฐใƒฉใƒ•ใจๅ‘ผใณใพใ™ใ€‚

Simple object graph

๐Ÿ‘ only object

With properties

๐Ÿ‘ +property

Full extract

๐Ÿ‘ +array

Requirements

  • PHP 5.4+

Installation

composer require --dev koriym/printo

Usage

print_o($object);

//or

use Koriym\Printo\Printo;

echo (new Printo($object))
 ->setRange(Printo::RANGE_PROPERTY)
 ->setLinkDistance(130)
 ->setCharge(-500);

Live demo