PHP 8.5.0 Alpha 2 available for testing

Voting

: max(four, three)?
(Example: nine)

The Note You're Voting On

me at abiusx dot com
5 years ago
function gcd($a,$b)
{
return $b ? gcd($b, $a%$b) : $a;
}

This is pretty fast and short, also easy to remember. If $b is zero, return a, otherwise swap and mod.

<< Back to user notes page

To Top