3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /** * bool isEven(int $number) * * use it to prove if a number is even or no * * @param int $number the number that you want to check * @return bool returns TRUE if the number is even, otherwise returns FALSE */ function isEven($number) { if(!($number % 2)) { return TRUE; } return FALSE; } print_r(isEven(2)); echo '<br>'; print_r(isEven(3)); echo '<br>'; print_r(isEven(50)); echo '<br>'; print_r(isEven(53));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1<br><br>1<br>