Skip to content

Instantly share code, notes, and snippets.

@dcb9
Created January 26, 2015 07:16
Show Gist options
  • Save dcb9/b4a4f8f3821e57653cad to your computer and use it in GitHub Desktop.
Save dcb9/b4a4f8f3821e57653cad to your computer and use it in GitHub Desktop.
测试使用 Neon 配置,感觉非常棒
{
"require": {
"nette/neon": "*"
}
}
# neon file - edit it now!
name: Homer
address:
street: 742 Evergreen Terrace
city: Springfield
country: USA
phones: { home: 555-6528, work: 555-7334 }
children:
- Bart
- Lisa
- Maggie
entity: Column(type=integer)
special: "#characters put in quotes"
# this is a comment
<?php
include('./vendor/autoload.php');
$content = file_get_contents('config.neon');
$config = \Nette\Neon\Neon::decode($content);
echo "Raw data:\n==========\n";
echo $content;
echo "Decode data:\n==========\n";
print_r($config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment