Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

php
gmp_kronecher
communitycreator

What is gmp_kronecker in PHP?

Hammad Nasir

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

gmp_kronecker is a function in PHP that finds out the Kronecker symbol of the arguments passed.

Syntax


gmp_kronecker(GMP|int|string $num1, GMP|int|string $num2): int

Parameters

The function takes in two parameters:

  • num1
  • num2

num1 and num2 can be a numeric string, GMP object, or of type int.

Return value

The function returns the Kronecker symbol of num1 and num2. The value returned is of type int.

Code

<?php
$result = gmp_kronecker("1", "3");
echo "The Kronecker symbol of result is: ".$result;
?>

Output


The Kronecker symbol of result is: 1

Reference: https://en.wikipedia.org/wiki/Kronecker_symbol

RELATED TAGS

php
gmp_kronecher
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring