1. Go to this page and download the library: Download decodelabs/overpass 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 / overpass example snippets
use DecodeLabs\Overpass\Context;
$context = new Context('path/to/project/');
use DecodeLabs\Overpass;
echo Overpass::$runDir; // Working directory
echo Overpass::$rootDir; // Parent or current dir containing package.json
echo Overpass::$packageFile; // Location of package.json
Overpass::run('myfile.js'); // node myfile.js
Overpass::runScript('my-script'); // npm run my-script
Overpass::install('package1', 'package2'); // npm install package1 package2
Overpass::installDev('package1', 'package2'); // npm install package1 package2 --save-dev
use DecodeLabs\Overpass;
$result = Overpass::bridge('myfile.js', 'world'); // 'hello world'
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.