PHP code example of asko / elejs
1. Go to this page and download the library: Download asko/elejs 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/ */
asko / elejs example snippets
use Asko\Js\Js;
$js = Js::fromFile('some-php-file.php');
use Asko\Js\Js;
$js = Js::fromString(' echo "hello, world";');
// $js becomes: console.log("hello, world");
use Asko\Js\Jsi;
function my_func(): void {
Jsi::alert("Alert about something");
}