1. Go to this page and download the library: Download nette/neon 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/ */
nette / neon example snippets
use Nette\Neon\Neon;
$neon = Neon::encode($value); // Returns $value converted to NEON
$neon = Neon::encode($value, true); // Returns $value converted to multiline NEON
// PHP
new Nette\Neon\Entity('Column', ['type' => 'int', 'nulls' => true])
// PHP
new Nette\Neon\Entity(Nette\Neon\Neon::Chain, [
new Nette\Neon\Entity('Column', ['type' => 'int', 'nulls' => true]),
new Nette\Neon\Entity('Field', ['id' => 1]),
])
neon
- 2016-06-03 # date
- 2016-06-03 19:00:00 # date & time
- 2016-06-03 19:00:00.1234 # date & microtime
- 2016-06-03 19:00:00 +0200 # date & time & timezone
- 2016-06-03 19:00:00 +02:00 # date & time & timezone