Generate random fitting fake data with Faker

Code
<?php

use Faker\Factory;

$faker Factory::create('it_IT');

dump(
    
// name and address from locale
    
$faker->name,
    
$faker->address,
    
$faker->dateTime,
    
// with optional(), it may return null
    
$faker->optional(0.5null)->colorName
);

echo 
sprintf(
    
'<img src="%s">',
    
$faker->imageUrl(320240'animals')
);
Result
"Olo Bellini"

"""
Rotonda Palumbo 889 Piano 6\n
Settimo Rebecca, 67866 Salerno (CT)
"""

DateTime @659633780 {#397
date: 1990-11-26 16:36:20.0 Europe/Berlin (+01:00)
}

null