• 0
    Posted by bkrukowski 2 years ago
    <?php
    
    use Awesomite\VarDumper\LightVarDumper;
    
    $array = array(
        'a' => 'a',
        'ab' => 'ab',
        'abc' => 'abc',
        'abcd' => 'abcd',
        'abcde' => 'abcde',
        'abcdef' => 'abcdef',
        'abcdefg' => 'abcdefg',
        'abcdefgh' => 'abcdefgh',
    );
    
    $smallArray = array(1, 2.5, null, M_PI, INF);
    
    $varDumper = new LightVarDumper();
    $varDumper
        ->setMaxChildren(20)
        ->setMaxDepth(5)
        ->setMaxStringLength(400)
        ->setMaxLineLength(50);
    
    $varDumper->dump(array($array, $smallArray));

    Output:

    array(2) {
        [0] =>
            array(8) {
                [a] =>        “a”
                [ab] =>       “ab”
                [abc] =>      “abc”
                [abcd] =>     “abcd”
                [abcde] =>    “abcde”
                [abcdef] =>   “abcdef”
                [abcdefg] =>  “abcdefg”
                [abcdefgh] => “abcdefgh”
            }
        [1] => array(5) {1, 2.5, NULL, M_PI, INF}
    }