定制 terremoth/php-dsv 二次开发

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

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

terremoth/php-dsv

最新稳定版本:v1.0.3

Composer 安装命令:

composer require terremoth/php-dsv

包简介

README 文档

README

Test Run Status License Latest Stable Version Total Downloads
codecov Test Coverage Psalm type coverage Psalm level Codacy Badge Maintainability

Inspired by: Why you should use and prefer DSV format instead of CSV

See demos/demo.php for examples.

Installation

composer require terremoth/php-dsv

Usage

require_once 'vendor/autoload.php';

use DSV\Writer;
use DSV\Reader;

$data = [
    ['Name', 'Comment'],
    ['Alice', 'She said, "Hello" and waved.'],
    ['Bob', 'This is a multi-line comment\r\nspanning two lines.'],
    ['Charlie', 'More fun with\ntwo lines.'],
    ['Diana', 'How about some UTF-8: café, naïve, résumé. 📝'],
    ['Edward', 'アップル'],
];

$writer = new Writer('demos/data.dsv');
$writer->write($data); // will write the $data to file in DSV format

$reader = new Reader('demos/data.dsv');
print_r($reader->read()); // will read the demos/data.dsv file and put it in array format 

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-22