mirror of
https://github.com/TheAlgorithms/PHP.git
synced 2025-01-17 15:18:13 +01:00
e0be0fdf54
* Add CheckOdd and CheckEven functions * code style improved * code corrected
14 lines
241 B
PHP
14 lines
241 B
PHP
<?php
|
|
|
|
/**
|
|
* This function checks whether
|
|
* the provided integer is even.
|
|
*
|
|
* @param int $number An integer input
|
|
* @return bool whether the number is even or not
|
|
*/
|
|
function isEven(int $number): bool
|
|
{
|
|
return $number % 2 === 0;
|
|
}
|