PHP code example of loginwashere / php-closure

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

    

loginwashere / php-closure example snippets


$c = new PhpClosure();
$c->add("path/to/js/my-app.js") // File must exist and be readable
    ->add("path/to/js/popup.js") // File must exist and be readable
    ->advancedMode()
    ->useClosureLibrary()
    ->cacheDir("path/to/tmp/js-cache/") // Directory must exist and be writable
    ->write();

PhpClosure::create()
    ->add("path/to/js/my-app.js") // File must exist and be readable
    ->add("path/to/js/popup.js") // File must exist and be readable
    ->advancedMode()
    ->useClosureLibrary()
    ->cacheDir("path/to/tmp/js-cache/") // Directory must exist and be writable
    ->write();
json
{
    "inwashere/php-closure": "*"
    }
}