The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

Overview
Comments
  • Mark iconv as a required PHP extension.

    Mark iconv as a required PHP extension.

    Var-dumper requires the iconv extension. I was using it on a freshly installed PHP instance and got the following fatal error:

    Error: Call to undefined function Symfony\Component\VarDumper\Dumper\iconv_strlen() in Symfony\Component\VarDumper\Dumper\CliDumper->dumpString() (line 172 of vendor/symfony/var-dumper/Dumper/CliDumper.php).

    opened by pfrenssen 3
  • added dd_if function

    added dd_if function

    We may want to see the output based on the conditions, so dd_if will make our job easier.

    $value = 1;
    $data = [1, 2, 3, 4, 5];
    
    dd_if(in_array($value, $data));
    
    
    opened by ahmetbarut 1
  • [VarDumper] Add FFI\CData and FFI\CType support

    [VarDumper] Add FFI\CData and FFI\CType support

    | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no

    Added support of FFI:

    $ffi = \FFI::cdef(<<<'CPP'
        typedef struct { int x; int y; } Point;
        typedef struct Example {
            uint8_t array[32];
            long longVal;
            __extension__ union {
                __extension__ struct { short shortVal; };
                struct { Point point; float e; };
            };
            bool boolValue;
            int (*func)(struct __sub *h);
        } Example;
    CPP);
    
    $struct = $ffi->new('Example');
    $struct->func = (static fn (object $ptr) => 42);
    
    dump($struct);
    

    Before

    FFI\CData {#2}
    

    After

    FFI\CData<struct Example> size 64 align 8 {#2
      +array: FFI\CData<uint8_t[32]> size 32 align 1 {#18}
      +int32_t longVal: 0
      +int16_t shortVal: 0
      +point: FFI\CData<struct <anonymous>> size 8 align 4 {#17
        +int32_t x: 0
        +int32_t y: 0
      }
      +float e: 0.0
      +bool boolValue: false
      +func: [cdecl] callable(struct __sub*): int32_t {#20
        returnType: FFI\CType<int32_t> size 4 align 4 {#25}
      }
    }
    
    opened by SerafimArts 1
  • Adds ddc helper function

    Adds ddc helper function

    Adds ddc helper function as an exhaustive version of dump.

    ddc stands for: Die Dump Count

    There is a lot of time when the first call to the dd() is not what we want. on the other hand, dump() does not have a break and prints out much more than we want.

    This is something in between dd and dump. For example, we want to see what parameters are passed to a method, but that method is called multiple times and the first couple of calls does not matter to us. Or any other debug a process which involves a loop

    <?php
    
    $i = 0;
    while (true) {
        $i++;
        ddc(4, $i);         // dumps 1, 2, 3, 4 then dies
        ddc([0, 4], $i);    // same as ddc(4, $i); 
    }
    
    $i = 0;
    while (true) {
        $i++;
        ddc([2,4], $i);   // dumps 3, 4 (skips 1, 2)
    }
    
    opened by imanghafoori1 1
  • Display fully qualified title

    Display fully qualified title

    We can see the objects with namespace that help us to navigate to the file easily.

    Before: These are diffrent Collection class Screen Shot 2019-09-06 at 1 02 37 PM

    Now: we can see the diffrent Screen Shot 2019-09-06 at 1 02 20 PM

    opened by pavinthan 1
  • [HTMLDumper] Possibility to replace existing css style

    [HTMLDumper] Possibility to replace existing css style

    Possibility to replace existing css style for HTMLDumper without replacing the whole css class definition like changing background-color, font or word-break, etc

    e.g.

    $dumper->changeStyle('default', 'word-break', 'break-word') would change css style of word-break to break-word from break-all

    opened by faizanakram99 1
  • fix: First time dump method call not working issue

    fix: First time dump method call not working issue

    Calling the dump() method for the first time is not producing any output. That's because, in the latest change, the first call to the dump method is not calling the $handler at all. It's just setting the $handler. In this PR, I've tried to fix this issue.

    opened by me-shaon 1
  • ClassStub closure fix

    ClassStub closure fix

    If the ClassStub needs to work with a class closure, it will throw a FatalErrorException. I got this:

    FatalErrorExceptionError: __debuginfo() must return an array
    --
    in ClassStub.php line 56
    at ReflectionMethod->__construct('\'eZ\\\\Publish\\\\Core\\\\Base\\\\Container\\\\ApiLoader\\\\Storage\\\\ExternalStorageRegistryFactory\'', '\'eZ\\\\Publish\\\\Core\\\\Base\\\\Container\\\\ApiLoader\\\\Storage\\\\{closure}\'') in ClassStub.php line 56
    at ClassStub->__construct('identifier' => '\'eZ\\\\Publish\\\\Core\\\\Base\\\\Container\\\\ApiLoader\\\\Storage\\\\ExternalStorageRegistryFactory->eZ\\\\Publish\\\\Core\\\\Base\\\\Container\\\\ApiLoader\\\\Storage\\\\{closure}\'', 'callable' => '???') in ExceptionCaster.php line 163
    ...
    

    This bugfix handles this situation.

    opened by fchris82 1
  • No such return type void

    No such return type void

    The return type used here will throw an error:

    Fatal error: Uncaught TypeError: Return value of Symfony\Component\VarDumper\Dumper\ServerDumper::dump() must be an instance of Symfony\Component\VarDumper\Dumper\void, none returned
    

    This PR simply removes it.

    opened by phillipsharring 1
  • [bugfix] Make possible to create sync tcp-connection

    [bugfix] Make possible to create sync tcp-connection

    On some systems creating async TCP connection results in "failed to open stream: Resource temporarily unavailable" exception. To solve this, added VAR_DUMPER_ASYNC variable, which is true by default, so won't affect default behavior.

    If one faces "failed to open stream: Resource temporarily unavailable" error, he should add VAR_DUMPER_ASYNC=0 to .env file, and problem would be solved.

    opened by nikserg 1
Releases(v6.2.3)
  • v6.2.3(Dec 28, 2022)

  • v6.1.9(Dec 28, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.1.8...v6.1.9)

    • bug #48615 Fix getting the name of closures on PHP 8.1.11+ (nicolas-grekas)
    • bug #48359 Ignore \Error in __debugInfo() (fancyweb)
    Source code(tar.gz)
    Source code(zip)
  • v6.0.17(Dec 28, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.0.16...v6.0.17)

    • bug #48615 Fix getting the name of closures on PHP 8.1.11+ (nicolas-grekas)
    • bug #48359 Ignore \Error in __debugInfo() (fancyweb)
    Source code(tar.gz)
    Source code(zip)
  • v5.4.17(Dec 28, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v5.4.16...v5.4.17)

    • bug #48615 Fix getting the name of closures on PHP 8.1.11+ (nicolas-grekas)
    • bug #48359 Ignore \Error in __debugInfo() (fancyweb)
    Source code(tar.gz)
    Source code(zip)
  • v6.2.2(Dec 16, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.2.1...v6.2.2)

    • bug #48615 Fix getting the name of closures on PHP 8.1.11+ (nicolas-grekas)
    • bug #48359 Ignore \Error in __debugInfo() (fancyweb)
    Source code(tar.gz)
    Source code(zip)
  • v6.2.1(Dec 6, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.2.0...v6.2.1)

    • bug #48461 Fix possible memory-leak when using lazy-objects (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v6.2.0(Nov 30, 2022)

  • v6.2.0-RC2(Nov 28, 2022)

  • v6.2.0-RC1(Nov 25, 2022)

  • v6.2.0-BETA3(Nov 19, 2022)

  • v6.2.0-BETA1(Oct 24, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.1.6...v6.2.0-BETA1)

    • feature #47730 Ban DateTime from the codebase (WebMamba)
    • feature #38996 Remove the default values from setters with a nullable parameter (derrabus, nicolas-grekas)
    • feature #46773 Add FFI\CData and FFI\CType types (SerafimArts)
    Source code(tar.gz)
    Source code(zip)
  • v6.1.6(Oct 12, 2022)

  • v6.0.14(Oct 12, 2022)

  • v5.4.14(Oct 12, 2022)

  • v4.4.47(Oct 12, 2022)

  • v6.1.5(Sep 30, 2022)

  • v6.0.13(Sep 30, 2022)

  • v5.4.13(Sep 30, 2022)

  • v4.4.46(Sep 30, 2022)

  • v6.1.3(Jul 29, 2022)

  • v6.0.11(Jul 29, 2022)

  • v5.4.11(Jul 29, 2022)

  • v4.4.44(Jul 29, 2022)

  • v6.1.0(May 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.1.0-RC1...v6.1.0)

    • bug #46421 Deal with DatePeriod->include_end_date on PHP 8.2 (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v6.0.9(May 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.0.8...v6.0.9)

    • bug #46421 Deal with DatePeriod->include_end_date on PHP 8.2 (nicolas-grekas)
    • bug #46221 Fix html-encoding emojis (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v5.4.9(May 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v5.4.8...v5.4.9)

    • bug #46421 Deal with DatePeriod->include_end_date on PHP 8.2 (nicolas-grekas)
    • bug #46221 Fix html-encoding emojis (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v4.4.42(May 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v4.4.41...v4.4.42)

    • bug #46421 Deal with DatePeriod->include_end_date on PHP 8.2 (nicolas-grekas)
    • bug #46221 Fix html-encoding emojis (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v6.1.0-RC1(May 14, 2022)

  • v6.1.0-BETA2(Apr 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.1.0-BETA1...v6.1.0-BETA2)

    • bug #46171 Fix dumping floats on PHP8 (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v6.0.8(Apr 27, 2022)

Laravel Dumper - Improve the default output of dump() and dd() in Laravel projects

Laravel Dumper Improve the default output of dump() and dd() in Laravel projects. Improves the default dump behavior for many core Laravel objects, in

Galahad 301 Dec 26, 2022
Clockwork - php dev tools in your browser - server-side component

Clockwork is a development tool for PHP available right in your browser. Clockwork gives you an insight into your application runtime - including requ

its 4.8k Dec 29, 2022
😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.

Tracy - PHP debugger Introduction Tracy library is a useful helper for everyday PHP programmers. It helps you to: quickly detect and correct errors lo

Nette Foundation 1.6k Dec 23, 2022
Ray server is a beautiful, lightweight php app build on Laravel that helps you debug your app. It runs without installation on multiple platforms.

RayServer is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app. It runs without installation on multiple platforms.

Pavel Buchnev 310 Jan 2, 2023
:page_with_curl: Provides a log viewer for Laravel

LogViewer By ARCANEDEV© This package allows you to manage and keep track of each one of your log files. NOTE: You can also use LogViewer as an API. Of

ARCANEDEV 2.3k Dec 30, 2022
PHP APM (Alternative PHP Monitor)

APM (Alternative PHP Monitor) APM (Alternative PHP Monitor) is a monitoring extension enabling native Application Performance Management (APM) for PHP

Patrick Allaert 310 Dec 4, 2022
Zipkin PHP is the official PHP Tracer implementation for Zipkin

Zipkin PHP is the official PHP Tracer implementation for Zipkin, supported by the OpenZipkin community. Installation composer require openz

Open Zipkin 250 Nov 12, 2022
Debug bar for PHP

PHP Debug Bar Displays a debug bar in the browser with information from php. No more var_dump() in your code! Features: Generic debug bar Easy to inte

Maxime Bouroumeau-Fuseau 4k Jan 8, 2023
Xdebug — Step Debugger and Debugging Aid for PHP

Xdebug Xdebug is a debugging tool for PHP. It provides step-debugging and a whole range of development aids, such as stack traces, a code profiler, fe

Xdebug 2.8k Jan 3, 2023
Kint - a powerful and modern PHP debugging tool.

Kint - debugging helper for PHP developers What am I looking at? At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug

null 2.7k Dec 25, 2022
PHP Benchmarking framework

PHPBench is a benchmark runner for PHP analogous to PHPUnit but for performance rather than correctness. Features include: Revolutions: Repeat your co

PHPBench 1.7k Jan 2, 2023
The Interactive PHP Debugger

The interactive PHP debugger Implemented as a SAPI module, phpdbg can exert complete control over the environment without impacting the functionality

Joe Watkins 841 Oct 9, 2022
Dontbug is a reverse debugger for PHP

Dontbug Debugger Dontbug is a reverse debugger (aka time travel debugger) for PHP. It allows you to record the execution of PHP scripts (in command li

Sidharth Kshatriya 709 Dec 30, 2022
PHP Debug Console

PHP Console A web console to try your PHP code into Creating a test file or using php's interactive mode can be a bit cumbersome to try random php sni

Jordi Boggiano 523 Nov 7, 2022
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source lib to make a debug in php direct in terminal, without necessary configure an IDE. Th

Renato Cassino 190 Dec 3, 2022
PCOV - CodeCoverage compatible driver for PHP

PCOV A self contained CodeCoverage compatible driver for PHP Requirements and Installation See INSTALL.md API /** * Shall start recording coverage in

Joe Watkins 613 Dec 21, 2022
Low-overhead sampling profiler for PHP 7+

phpspy phpspy is a low-overhead sampling profiler for PHP. For now, it works with Linux 3.2+ x86_64 non-ZTS PHP 7.0+ with CLI, Apache, and FPM SAPIs.

Adam 1.3k Dec 24, 2022
PHP errors for cool kids

whoops PHP errors for cool kids whoops is an error handler framework for PHP. Out-of-the-box, it provides a pretty error interface that helps you debu

Filipe Dobreira 12.9k Dec 24, 2022
Laravel Debugbar (Integrates PHP Debug Bar)

Laravel Debugbar This is a package to integrate PHP Debug Bar with Laravel. It includes a ServiceProvider to register the debugbar and attach it to th

Barry vd. Heuvel 14.8k Jan 9, 2023