How can the use of random_int() function in PHP contribute to better randomness in generating TRUE/FALSE values?

Using the random_int() function in PHP can contribute to better randomness in generating TRUE/FALSE values by providing a more secure and reliable way to generate random integers. This function generates cryptographically secure pseudo-random integers, which helps in creating more unpredictable TRUE/FALSE outcomes compared to using other random functions like rand().

$randomValue = (bool) random_int(0, 1);
var_dump($randomValue);