PHP code example of ixnode / php-array-to-object

1. Go to this page and download the library: Download ixnode/php-array-to-object 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/ */

    

ixnode / php-array-to-object example snippets


use Ixnode\PhpArrayToObject\ArrayToObject;

$array = [
    'backgroundColor' => '255,255,255,100',
    'printCalendarWeek' => true,
    'printWeekNumber' => true,
    'printQrCodeMonth' => true,
    'printQrCodeTitle' => true,
    'aspectRatio' => 1.414,
    'height' => 4000,
];

$backgroundColor = (new ArrayToObject($array))->getBackgroundColor();
bash
vendor/bin/php-array-to-object -V
bash
php-array-to-object 0.1.0 (12-31-2022 15:51:08) - Björn Hempel <[email protected]>
bash
git clone [email protected]:ixnode/php-array-to-object.git && cd php-array-to-object