railt/dumper

该软件包已被废弃,不再维护。未建议替代软件包。

Railt 框架用于探索和导出 PHP 变量类型的机制

1.4.x-dev 2023-09-17 16:11 UTC

This package is auto-updated.

Last update: 2023-09-17 16:11:27 UTC


README

Railt

Travis CI 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f65323266626136323238623166613634316531302f746573745f636f766572616765 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f65323266626136323238623166613634316531302f6d61696e7461696e6162696c697479

PHP 7.1+ railt.org Discord Latest Stable Version Total Downloads License MIT

此软件包已过时。请使用 get_debug_type PHP 函数代替。

导出器

注意:所有问题和疑问请发送至 https://github.com/railt/railt/issues

用法

短类型导出组件。可以用作异常或简短消息中的值显示,而不详细揭示内部结构。

<?php

echo dump_type(function (string $message = 'Hello World!'): string {
    return $message;
});

// fn((string $message = "Hello World!") -> string)
<?php

echo dump_type(new ArrayIterator([1, 2, 3, 0.2]));

// object(ArrayIterator#18<int|float>)