Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Generate a random value via the Mersenne Twister Random Number Generator
<?php mt_rand(): int
<?php         $errno = 0;

        $errstr = '';

        for ($i = 0; $i < 20 && $errno !== $enetunreach; ++$i) {

            $address = 'tcp://192.168.' . mt_rand(0, 255) . '.' . mt_rand(1, 254) . ':8123';

            $client = @stream_socket_client($address, $errno, $errstr, 0.1 * $i);

        }

        if ($client || $errno !== $enetunreach) {