PHP TutorialLesson 10Free preview
PHP Numbers
This lesson is part of PHP · All levels
Summary
PHP recognizes two groups of prime numbers, namely integers for integers and floats for decimal numbers. This lesson discusses how PHP differentiates between the two, from basic arithmetic operations, to numerical type-checking and decomposition. Understanding numbers is important because almost all applications process data in this form.
Key points
- An integer is an integer, a float is a decimal number
- PHP automatically determines the type of a number from its value form
- The operator % counts the remainder of the, / for the normal distribution
- Use is_numeric() to check whether the value is numeric
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.