PHP code example of auxmoney / avro-php
1. Go to this page and download the library: Download auxmoney/avro-php 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/ */
auxmoney / avro-php example snippets
$avroFactory = AvroFactory::create();
$defaultLogicalTypeFactories = AvroFactory::getDefaultLogicalTypeFactories();
$defaultLogicalTypeFactories['custom'] = new MyCustomLogicalTypeFactory();
$options = new Options(logicalTypeFactories: $defaultLogicalTypeFactories);
$avroFactory = AvroFactory::create($options);
$options = new Options(logicalTypeFactories: []);
$avroFactory = AvroFactory::create($options);
bash
composer bash
php examples/encoding.php
php examples/decoding.php
php examples/logical-type.php