1. Go to this page and download the library: Download exorg/data-coder 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/ */
use ExOrg\DataCoder\Coder\Yaml\Data\Decoder;
$data = '
firstName: John
lastName: Smith
address:
streetAddress: 21 2nd Street
city: New York
state: NY
postalCode: 10021-3100
';
$decoder = new Decoder();
$result = $decoder->decodeData($data);
print_r($result);