PHP code example of nackjicholson / file-parser
1. Go to this page and download the library: Download nackjicholson/file-parser 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/ */
nackjicholson / file-parser example snippets
Parser = new \Nack\FileParser\FileParser();
print_r($fileParser->yaml('foobar.yml'));
$fileParser = new FileParser();
$splFileInfo = new \SplFileInfo('path/to/file.yml');
$fileParser->yaml($splFileInfo);
$splFileObject = new \SplFileObject('path/to/file.json');
$fileParser->json($splFileObject);