Home - ahamed/JsPhp GitHub Wiki
Installation
composer
is needed for installing the package. If you have composer installed then run the command.
composer require ahamed/jsphp
Usage
After successful installation, include the library in your project.
require_once __DIR__ . '/vendor/autoload.php';
use Ahamed\JsPhp\JsArray;
$data = [1, 2, 3, 4, 5];
$array = new JsArray($data);
$square = $array->map(
function ($item) {
return $item * $item;
}
);
print_r($square);