public static function genRndTempnam($dir = null, $prefix = 'php')
    {
        if (!$dir) {
            $dir = sys_get_temp_dir();
        }

        static $n = 0;

        return $dir . '/' . $prefix . str_shuffle(
            md5(
                str_shuffle(
                    microtime(true) . chr(mt_rand(0, 0xFF))
                    . Daemon::$process->getPid() . chr(mt_rand(0, 0xFF))
                    . (++$n) . mt_rand(0, mt_getrandmax())
                )
            )
        );
    }
public static function genRndTempnam($dir = null, $prefix = 'php')
    {
        if (!$dir) {
            $dir = sys_get_temp_dir();
        }

        static $n = 0;

        return $dir . '/' . $prefix . str_shuffle(
            md5(
                str_shuffle(
                    microtime(true) . chr(mt_rand(0, 0xFF))
                    . Daemon::$process->getPid() . chr(mt_rand(0, 0xFF))
                    . (++$n) . mt_rand(0, mt_getrandmax())
                )
            )
        );
    }
public static function genRndTempnam ( $ dir = null , $ prefix = 'php' ) { if ( ! $ dir ) { $ dir = sys_get_temp_dir ( ) ; } static $ n = 0 ; return $ dir . '/' . $ prefix . str_shuffle ( md5 ( str_shuffle ( microtime ( true ) . chr ( mt_rand ( 0 , 0xFF ) ) . Daemon :: $ process -> getPid ( ) . chr ( mt_rand ( 0 , 0xFF ) ) . ( ++ $ n ) . mt_rand ( 0 , mt_getrandmax ( ) ) ) ) ) ; }
Returns random temporary file name
@param  string $dir Directory
@param  string $prefix Prefix
@return string         Path
Returns random temporary file name