Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

gmp_scan0

Description

The gmp_scan0 of GMP for PHP scans for 0.

Syntax

gmp_scan0(
    GMP|int|string $num,
    int $start
): int

Parameters

num

The number to scan.

A GMP object, an int or a numeric string.

start

The starting bit.

Return

Returns the index of the found bit, as an int. The index starts from 0.

Examples

1 · num · GMP

<?

$num = 0b101;
$start = 0;

$num = gmp_init($num);

$return = gmp_scan0($num, $start);

echo $return;

?>
1

2 · num · int

<?

$num = 0b101;
$start = 0;

$return = gmp_scan0($num, $start);

echo $return;

?>
1

3 · num · string

<?

$num = "0b101";
$start = 0;

$return = gmp_scan0($num, $start);

echo $return;

?>
1

4 · start

<?

$num = "0b101";
$start = 2;

$return = gmp_scan0($num, $start);

echo $return;

?>
3
HomeMenu