{"id":31045760,"url":"https://github.com/horizom/var-dumper","last_synced_at":"2025-09-14T17:31:56.077Z","repository":{"id":56771959,"uuid":"524936220","full_name":"horizom/var-dumper","owner":"horizom","description":"A better alternative to print_r / var_dump","archived":false,"fork":false,"pushed_at":"2024-06-12T14:18:32.000Z","size":564,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T05:33:53.207Z","etag":null,"topics":["debug","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/horizom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-15T10:01:01.000Z","updated_at":"2025-05-16T22:18:57.000Z","dependencies_parsed_at":"2023-01-30T08:15:16.043Z","dependency_job_id":null,"html_url":"https://github.com/horizom/var-dumper","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/horizom/var-dumper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horizom%2Fvar-dumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horizom%2Fvar-dumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horizom%2Fvar-dumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horizom%2Fvar-dumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/horizom","download_url":"https://codeload.github.com/horizom/var-dumper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horizom%2Fvar-dumper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275139269,"owners_count":25412218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debug","php"],"created_at":"2025-09-14T17:31:55.077Z","updated_at":"2025-09-14T17:31:56.064Z","avatar_url":"https://github.com/horizom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://packagist.org/packages/horizom/var-dumper\"\u003e\u003cimg src=\"https://poser.pugx.org/horizom/var-dumper/d/total.svg\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/horizom/var-dumper\"\u003e\u003cimg src=\"https://poser.pugx.org/horizom/var-dumper/v/stable.svg\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/horizom/var-dumper\"\u003e\u003cimg src=\"https://poser.pugx.org/horizom/var-dumper/license.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nVarDumper, or `dump()` is a nicer alternative to PHP's [`print_r`](http://php.net/manual/en/function.print-r.php) / [`var_dump`](http://php.net/manual/en/function.var-dump.php) functions. \n\nThis project is a fork of the original project by [digitalnature](https://github.com/digitalnature/php-ref). A big thank you to him for the work he has done on his project.\n\n## DEMO\n\n\u003cimg src=\"var-dumper.jpg\"\u003e\u003cbr\u003e\n\nOr You can see full demo at [Full demo](var-dumper-full-demo.jpg)\n\n## Installation using Composer\n\nAdd VarDumper to your `composer.json`:\n\n```json\n{\n    \"require\": {\n        \"horizom/var-dumper\": \"^3.1\"\n    }\n}\n```\n\nNow tell composer to download the bundle by running:\n\n```bash\ncomposer require horizom/var-dumper\n```\n\nComposer will install the bundle to the directory `vendor/horizom`.\n\n## Usage\n\nBasic example:\n\n```php\n// include the class (not needed if project runs with Composer because it's auto-loaded)\nrequire 'vendor/autoload.php';\n\n// display info about defined classes\ndump(get_declared_classes());\n\n// display info about global variables\ndump($GLOBALS);\n```\n\nTo print in text mode you can use the `dump_text()` function instead:\n\n```php\ndump_text($var);\n```\n\nTo terminate the script after the info is dumped, prepend the bitwise NOT operator:\n\n```php\n~dump($var);   // html\n~dump_text($var);  // text\n```\n\nPrepending the error control operator (@) will return the information:\n\n```php\n$output = @dump($var);   // html\n$output = @dump_text($var);  // text\n```\n\nKeyboard shortcuts (javascript must be enabled):\n\n- `X` - collapses / expands all levels\n- `Ctrl` + `X` - toggles display state\n\nTo modify the global configuration call `\\Horizom\\VarDumper\\VarDumper::config()`:\n\n```php\n// example: initially expand first 3 levels\n\\Horizom\\VarDumper\\VarDumper::config('expLvl', 3);\n```\n\nYou can also add configuration options in your `php.ini` file like this:\n\n```ini\n[varDumper]\nvarDumper.expLvl = 3\nvarDumper.maxDepth = 4\n```\n\nCurrently available options and their default values:\n\n| Option                    | Default             | Description\n|:------------------------- |:------------------- |:-----------------------------------------------\n| `'expLvl'`                | `1`                 | Initially expanded levels (for HTML mode only). A negative value will expand all levels\n| `'maxDepth'`              | `6`                 | Maximum depth (`0` to disable); note that disabling it or setting a high value can produce a 100+ MB page when input involves large data\n| `'showIteratorContents'`  | `FALSE`             | Display iterator data (keys and values)\n| `'showResourceInfo'`      | `TRUE`              | Display additional information about resources\n| `'showMethods'`           | `TRUE`              | Display methods and parameter information on objects\n| `'showPrivateMembers'`    | `FALSE`             | Include private properties and methods\n| `'showStringMatches'`     | `TRUE`              | Perform and display string matches for dates, files, json strings, serialized data, regex patterns etc. (SLOW)\n| `'formatters'`            | `array()`           | Custom/external formatters (as associative array: format =\u003e className)\n| `'shortcutFunc'`          | `array('dump', 'dump_text')`  | Shortcut functions used to detect the input expression. If they are namespaced, the namespace must be present as well (methods are not  supported)\n| `'stylePath'`             | `'{:dir}/assets/dumper.css'`  | Local path to a custom stylesheet (HTML only); `FALSE` means that no CSS is included.\n| `'scriptPath'`            | `'{:dir}/assets/dumper.js'`   | Local path to a custom javascript (HTML only); `FALSE` means no javascript (tooltips / toggle / kbd shortcuts require JS)\n| `'showUrls'`              | `FALSE`             | Gets information about URLs. Setting to false can improve performance (requires showStringMatches to be TRUE)\n| `'timeout'`               | `10`                | Stop execution after this amount of seconds, forcing an incomplete listing. Applies to all calls\n| `'validHtml'`             | `FALSE`             | For HTML mode only. Whether to produce W3C-valid HTML (larger code output) or unintelligible, potentially browser-incompatible but much smaller code output\n\n## TODOs\n\n- Inherit DocBlock comments from parent or prototype, if missing\n- Refactor \"bubbles\" (for text-mode)\n- Correctly indent multi-line strings (text-mode)\n- Move separator tokens to ::before and ::after pseudo-elements (html-mode)\n\n## Changelog\n\nAll notable changes to this project will be documented in the file [CHANGELOG](CHANGELOG.md).\n\n## License\n\nThe Horizom framework is open-sourced software licensed under the [MIT license](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorizom%2Fvar-dumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhorizom%2Fvar-dumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorizom%2Fvar-dumper/lists"}