php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #7307 New Feature: Function for checking odd Numbers?
Submitted: 2000-10-18 07:41 UTC Modified: 2000-10-18 10:02 UTC
From: aheckmeier at bct-technology dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.3pl1 OS: Linux/NT
Private report: No CVE-ID: None

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-18 10:02 UTC] derick@php.net
The user told me that the following was adequate too:

function is_odd ($n) 
{ 
    return (($n%2)!=0); 
} 

function is_even ($n) 
{ 
    return (($n%2)==0); 
} 

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 14 09:00:02 2026 UTC