2017 © Pedro Peláez
 

yii2-extension yii2-prettydumper

Dump any PHP types and objects to browser or console

image

sb/yii2-prettydumper

Dump any PHP types and objects to browser or console

  • Friday, February 12, 2016
  • by iSynth
  • Repository
  • 0 Watchers
  • 1 Stars
  • 66 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Yii2 pretty var dumper

Dump any PHP types and objects to browser or console., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist sb/yii2-prettydumper "*"

This will install code to 'vendor/sb/yii2-prettydumper' folder., (*4)

Usage example with simple controller

<?php

    namespace frontend\controllers;

    // add Yii components namespaces
    use Yii;
    use yii\web\Controller;

    // add prettydumper component namespace
    use sb\prettydumper;

    function dump($var, $return = false)
    {
        $output = Dumper::Dump($var);

        if($return)
        {
            return $output;
        }
        else
        {
            echo $output;
        }
    }

    function roll()
    {
        foreach (func_get_args() as $val) dump($val);
    }

    class SiteController extends Controller
    {
        public function actionTest()
        {
            // dump arrays
            dump($_SERVER);

            // dump objects
            $ob = new stdClass();
            $ob->property = 'This is a object property value';
            dump($ob);

            // dump any internal PHP types
            dump("String 1");
            dump(100);
            dump(0.10);
            dump(true);

            // roll any values
            roll($_SERVER, $ob, 'String 2', 200, 0.20, false);
        }
    }

The Versions

12/02 2016

dev-master

9999999-dev

Dump any PHP types and objects to browser or console

  Sources   Download

LGPL

The Requires

 

by Synthetic Brain

debug dump vardump

12/02 2016

1.0.5

1.0.5.0

Dump any PHP types and objects to browser or console

  Sources   Download

LGPL

The Requires

 

by Synthetic Brain

debug dump vardump

29/09 2015

1.0.4

1.0.4.0

Dump any PHP types and objects to browser or console

  Sources   Download

LGPL

The Requires

 

by Synthetic Brain

debug dump vardump

25/04 2015

1.0.3

1.0.3.0

Dump any PHP types and objects to browser or console

  Sources   Download

LGPL

The Requires

 

by Synthetic Brain

debug dump vardump

25/04 2015

1.0.2

1.0.2.0

Dump any PHP types and objects to browser or console

  Sources   Download

LGPL

The Requires

 

by Synthetic Brain

debug dump vardump

25/04 2015

1.0.1

1.0.1.0

Dump any PHP types and objects to browser or console

  Sources   Download

LGPL

The Requires

 

by Synthetic Brain

debug dump vardump