seffeng/xml-helper

PHP extension xml helper

v0.1.0 2022-08-25 15:54 UTC

This package is auto-updated.

Last update: 2024-11-25 20:52:55 UTC


README

安装

# 安装
$ composer require seffeng/xml-helper

目录说明

|---src
|   |   Xml.php
|---tests
|       XmlTest.php

示例

/**
 * TestController.php
 * 示例
 */
namespace App\Http\Controllers;

use Seffeng\XmlHelper\Xml;

class TestController extends Controller
{
    public function index()
    {
        $value = ['a' => ['id' => 1,'name' => 'aaa']];
        var_dump(Xml::toXml($value));
    }
}

备注

1、更多示例请参考 tests 目录下测试文件。