1. Go to this page and download the library: Download martinezdelariva/hydrator 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/ */
martinezdelariva / hydrator example snippets
class Person
{
private $name;
private $age;
private $hobbies = [];
private $student = false;
public function __construct(string $name, int $age, array $hobbies, bool $student)
{
$this->name = $name;
$this->age = $age;
$this->hobbies = $hobbies;
$this->student = $student;
}
}