composer is needed for installing the package. If you have composer installed then run the command.
composer
composer require ahamed/jsphp
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);
There was an error while loading. Please reload this page.