PHP code example of bstoots / wox-php

1. Go to this page and download the library: Download bstoots/wox-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bstoots / wox-php example snippets


use Bstoots\WOX\Serial\{SimpleWriter, SimpleReader};

$doubles = [12.45, 878.98, 987.98, 435.87, 537.87, 89.0, 0.0, 667.332];

$writer = new SimpleWriter();
$xml = $writer->write($doubles);
var_dump($xml);
// string(138) "<?xml version="1.0"