<?php

class DniGenerator {


    static function generateRandomDni () {
        $letters_dni = array('T','R','W','A','G','M','Y','F','P','D','X','B','N','J','Z','S','Q','V','H','L','C','K','E');

        $digits_dni = rand(1000, 9999) . rand(1000, 9999);
        $letter_dni = $letters_dni[$digits_dni%23];

        return $digits_dni.$letter_dni;
    }
}




?>