Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Generate a random integer
<?php rand(): int
<?php             return 0;

        }



        $tempFilename = $tmpDir . '/' . basename($localFilename, '.phar').'-temp'.rand(0, 10000000).'.phar';

        $backupFile = sprintf(

            '%s/%s-%s%s',

            $rollbackDir,
<?php         $root = sys_get_temp_dir();



        do {

            $unique = $root . DIRECTORY_SEPARATOR . uniqid('composer-test-' . rand(1000, 9000));



            if (!file_exists($unique) && Silencer::call('mkdir', $unique, 0777)) {

                return realpath($unique);