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
"Dott. Neri Costantini"

"""
Incrocio Loredana 09\n
Longo a mare, 56218 Frosinone (GO)
"""

DateTime {#385
+"date": "1995-11-01 11:28:23.000000"
+"timezone_type": 3
+"timezone": "Europe/Berlin"
}

"DarkGreen"