定制 jacobstr/dumpling 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jacobstr/dumpling

Composer 安装命令:

composer require jacobstr/dumpling

包简介

Like print_r, but depth limited and cyclic reference safe.

README 文档

README

A small utility for generating variable dumps. PHP's built-in print_r goes haywire when using complex object graphs. It also outputs directly to stdout by default.

Originally based off the code here: http://ca2.php.net/print_r#78851. Wrapped up and packaged for the composer era.

Usage

Dumpling

>> echo Dumpling::d($cyclical_line_point_object);

Dumpling\Tests\Line Object (
    [points] => Array (
        [0] => Dumpling\Tests\Point Object (
            [x] => 5
            [y] => 10
            [line] => Nested Dumpling\Tests\Line Object
        )
    )
)

>> echo Dumpling::d(array_slice(debug_backtrace(),0,2),2);

Array (
    [0] => Array (
        [function] => should_dump_a_recursive_object_at_depth_2
        [class] => Dumpling\Tests\DumplingTest
        [object] => Nested Dumpling\Tests\DumplingTest Object
        [type] => ->
        [args] => Nested Array
    )
    [1] => Array (
        [file] => /Users/jacob/Work/dumpling/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php
        [line] => 983
        [function] => invokeArgs
        [class] => ReflectionMethod
        [object] => Nested ReflectionMethod Object
        [type] => ->
        [args] => Nested Array
    )
)

Tests

composer install
vendor/bin/phpunit tests/DumplingTest.php

统计信息

  • 总下载量: 30.94k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固