{"id":16272561,"url":"https://github.com/ghostff/dump7","last_synced_at":"2025-03-19T23:31:05.641Z","repository":{"id":62510548,"uuid":"106340584","full_name":"Ghostff/Dump7","owner":"Ghostff","description":"A pretty version of php(7+) var_dump ","archived":false,"fork":false,"pushed_at":"2022-09-06T23:49:42.000Z","size":909,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T12:11:49.582Z","etag":null,"topics":["cgi","data-dump","dump","php-cli","php-dump","php7","pretty-data-dump"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ghostff.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-10-09T22:11:53.000Z","updated_at":"2024-06-25T15:03:02.000Z","dependencies_parsed_at":"2022-11-02T10:30:53.860Z","dependency_job_id":null,"html_url":"https://github.com/Ghostff/Dump7","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghostff%2FDump7","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghostff%2FDump7/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghostff%2FDump7/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghostff%2FDump7/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ghostff","download_url":"https://codeload.github.com/Ghostff/Dump7/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244524825,"owners_count":20466506,"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","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":["cgi","data-dump","dump","php-cli","php-dump","php7","pretty-data-dump"],"created_at":"2024-10-10T18:18:14.759Z","updated_at":"2025-03-19T23:31:05.250Z","avatar_url":"https://github.com/Ghostff.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pretty Data Dump\nA pretty version of php [var_dump](http://php.net/manual/en/function.var-dump.php). This class displays structured information about one or more expressions that includes its type and value.\n\n_Check out [Dump5](https://github.com/Ghostff/Dump5) for PHP 5+_\n\n# Installation   \nYou can download the  Latest [release version ](https://github.com/Ghostff/pretty_data_dump/releases/) as a standalone, alternatively you can use [Composer](https://getcomposer.org/) \n```bash\ncomposer require ghostff/dump7\n```\n```json\n\"require\": {\n    \"ghostff/dump7\": \"^1.0\"\n}\n```    \n# Display Flags\nYou can simple hide or show some object attribute using a Doc block flag:\n\n|                               |                                                   |\n|-------------------------------|---------------------------------------------------|\n| `@dumpignore-inheritance`     | Hides inherited class properties.                 |\n| `@dumpignore-inherited-class` | Hides the class name from inherited properties.   |\n| `@dumpignore-private`         | Show all properties except the **private** ones.  |\n| `@dumpignore-protected`       | Show all properties except the **protected** ones.|\n| `@dumpignore-public`          | Show all properties except the **public** ones.   |\n| `@dumpignore`                 | Hide the property the Doc comment belongs to.     |\n```php\n/**\n* @dumpignore-inheritance\n* @dumpignore-inherited-class\n* @dumpignore-private\n* @dumpignore-public\n* @dumpignore-public\n*/\nClass Foo extends Bar {\n    /** @dumpignore */\n    private ?BigObject $foo = null;\n}\n```\n\n# Usage\n\n```php\nclass FooBar\n{\n    private $inherited_int   = 123;\n    private $inherited_array = ['string'];\n}\n\nclass Bar extends FooBar\n{\n    private $inherited_float = 0.22;\n    private $inherited_bool  = 1 == '1';\n}\n\nclass Foo extends Bar\n{\n    private $string = 'string';\n    protected $int  = 10;\n    public $array   = [\n        'foo' =\u003e 'bar'\n    ];\n    protected static $bool = false;\n}\n\n$string   = 'Foobar';\n$array    = ['foo', 'bar'];\n$int      = 327626;\n$double   = 22.223;\n$null     = null;\n$bool     = true;\n$resource = fopen('LICENSE', 'r');\n$m        = microtime(true);\n\nnew Dump(new Foo, $string, $array, $int, $double, $null, $bool, [\n    'foo' =\u003e 'bar',\n    'bar' =\u003e 'foo',\n    [\n        'foo' =\u003e 'foobar',\n        'bar_foo',\n        2 =\u003e 'foo',\n        'foo' =\u003e [\n            'barbar' =\u003e 55,\n            'foofoo' =\u003e false,\n            'foobar' =\u003e null,\n        ]\n    ]\n], $resource);\n\nnew Dump(1 == '1', 1 === '1');\nDump::safe(...$args); # running on terminal without color capabilities.\n```\nReplacing predefined colors:\n```php\n# set($name, [$cgi_color, $cli_color]);\nDump::set('boolean', ['bb02ff', 'purple']);\n```\n\nBy default, when `Dump` is called inside a function, the call line is set to `new Dump` inside the function instead of the function\ncall. With `setTraceOffset` you can set the offset of each call line.\n```php\nfunction dump()\n{\n    Dump::setTraceOffset(2);\n    new Dump(...func_get_args()); # Dont use this test.php(line:4) as call line\n}\n\ndump('foo', 22, 'bar', true); // Use test.php(line:7) instead\n```\n\nCGI output:    \n\n![cgi screenshot](https://github.com/Ghostff/Dump7/blob/master/cgi.png)\n\nCLI(Unix):     \n    \n![cli screenshot](https://github.com/Ghostff/Dump7/blob/master/posix.png)\n\nCLI(Window):     \n\n![cli screenshot](https://github.com/Ghostff/Dump7/blob/master/posixWin.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostff%2Fdump7","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostff%2Fdump7","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostff%2Fdump7/lists"}