PHP 8.4.6 Released!

Random\Randomizer::nextInt

(PHP 8 >= 8.2.0)

Random\Randomizer::nextIntGet a positive integer

Açıklama

public Random\Randomizer::nextInt(): int

Uyarı

Bu işlev hala belgelendirilmemiştir; sadece bağımsız değişken listesi mevcuttur.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

A positive integer between 0 and a maximum value depending on the number of bytes returned from Random\Engine::generate(). The exact maximum can be calculated as 2$engine_bytes * 8 - 1 - 1.

Hatalar/İstisnalar

Örnekler

Örnek 1 Random\Randomizer::nextInt() example

<?php
$r
= new \Random\Randomizer();

/ Random "next" integer:
echo $r->nextInt(), "\n";
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

8041689838856078718
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant