1. Go to this page and download the library: Download nicmart/arrayze 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/ */
nicmart / arrayze example snippets
class Person
{
private $firstName;
private $lastName;
private $birthYear;
public function __construct($firstName, $surname, $birthYear) { ... }
public function getFirstName() { return $this->firstName; }
public function getLastName() { return $this->lastName; }
public function getBirthYear() { return $this->birthYear; }
}
use NicMart\Arrayze\ArrayAdapter;
$nic = new Person("Nicolò", "Martini", 1983);
$arrayzedNic = new ArrayAdapter($nic, $maps);
echo $arrayzedNic["full name"]; // Prints "Nicolò Martini"
echo $arrayzedNic["age"]; // Prints 31
echo $arrayzedNic["name and age"]; // Prints "Nicolò Martini, 31"
foreach ($arrayzedNic as $key => $value)
echo "$key: $value\n";
// Prints
// first name: Nicolò
// last name: Martini
// full name: Nicolò Martini
// age: 31
// name and age: Nicolò Martini, 31
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.