PHP code example of addvilz / pharaoh

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

    

addvilz / pharaoh example snippets


#!/usr/bin/env php


$composer = (new \Symfony\Component\Finder\Finder())
    ->files()
    ->ignoreVCS(true)
    ->name('*.php')
    ->exclude(['test', 'tests', 'spec'])
    ->in(__DIR__ . '/vendor/');

$src = (new \Symfony\Component\Finder\Finder())
    ->files()
    ->ignoreVCS(true)
    ->name('*.php')
    ->in(__DIR__ . '/src/');

$builder = (new \Addvilz\Pharaoh\Builder('myapp.phar', __DIR__, __DIR__))
    ->addFinder($composer)
    ->addFinder($src)
//    ->addFile('LICENSE')
//    ->addFile('README.md')
    ->build('index.php') // file that contains the "index" code of your app
;