PHP code example of decodelabs / hatch

1. Go to this page and download the library: Download decodelabs/hatch 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/ */

    

decodelabs / hatch example snippets


use DecodeLabs\Hatch;

$code = Hatch::exportStaticArray([
    'foo' => 'bar',
    'baz' => 'qux',
    'quux' => [
        'corge' => 'grault',
        'garply' => 12,
        'fred' => [
            'plugh' => 'xyzzy',
            'thud' => [1, 2, 3]
        ]
    ]
]);

echo $code;

[
    'foo' => 'bar',
    'baz' => 'qux',
    'quux' => [
        'corge' => 'grault',
        'garply' => 12,
        'fred' => [
            'plugh' => 'xyzzy',
            'thud' => [1, 2, 3]
        ]
    ]
]