Reading/writing NEON files
- materix
- Member | 68
With Symfony YAML you can read/write from files like this:
use Symfony\Component\Yaml\Yaml;
$array = [
'foo' => 'bar',
'bar' => ['foo' => 'bar', 'bar' => 'baz'],
];
$yaml = Yaml::dump($array);
file_put_contents('/path/to/file.yaml', $yaml);
or
$value = Yaml::parseFile('/path/to/file.yaml');
How can we do the same thing with NEON-files in a standalone php-file? (without all nette-framework)