PHP code example of erazdorova / otus-userdata-package
1. Go to this page and download the library: Download erazdorova/otus-userdata-package 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/ */
erazdorova / otus-userdata-package example snippets
ERazdorova\OtusUserDataPackage\Processor\UserDataProcessor;
$userData = new UserDataProcessor('Александровна', '01.01.1999');
printf("Пол: %s\n", $userData->getGender() ?? '<не определен>');
printf("Возраст: %s\n", $userData->getAge() ?? '<не определен>');
printf("Возрастная категория (согласно ВОЗ): %s\n", $userData->getAgeGrade() ?? '<не определена>');