PHP code example of rinsvent / transformer

1. Go to this page and download the library: Download rinsvent/transformer 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/ */

    

rinsvent / transformer example snippets


composer 

$t = new Transformer();
$dt = new \DateTime('2022-04-01');
$dt->setTime(5, 23, 21);
$actual = $t->transform($dt, new Transformer\DateTimeFormat());
$this->assertEquals('2022-04-01T05:23:21+00:00', $actual);