When I began discussing variables, I was explicit in stating that PHP has both integer and floating-point (decimal) number types. In my experience, though, these two types can be classified under the generic title numbers without losing any valuable distinction (for the most part). Valid number-type variables in PHP can be anything like
Notice that these values are never quoted—in which case they’d be strings with numeric values—nor do they include commas to indicate thousands. Also, a number is assumed to be positive unless it is preceded by the minus sign (-).
Along with the standard arithmetic operators you can use on numbers (Table 1.1), there are dozens of functions. Two I’ll introduce here ...