33        'em' => 
true, 
'ex' => 
true, 
'px' => 
true, 
'in' => 
true,
 
   34        'cm' => 
true, 
'mm' => 
true, 
'pt' => 
true, 
'pc' => 
true,
 
   35        'ch' => 
true, 
'rem' => 
true, 
'vw' => 
true, 
'vh' => 
true,
 
   36        'vmin' => 
true, 
'vmax' => 
true 
   45        $this->n = (string) 
$n;
 
   46        $this->unit = $u !== 
false ? (string) $u : 
false;
 
   59        $n_length = strspn(
$s, 
'1234567890.+-');
 
   60        $n = substr(
$s, 0, $n_length);
 
   75        if ($this->n === 
'+0' || $this->n === 
'-0') {
 
   78        if ($this->n === 
'0' && $this->unit === 
false) {
 
   81        if (!ctype_lower($this->unit)) {
 
   82            $this->unit = strtolower($this->unit);
 
  151        if (
$l->unit !== $this->unit) {
 
  153            $l = $converter->convert(
$l, $this->unit);
 
  158        return $this->n - 
$l->n;
 
An exception for terminatinating execution or to throw for unit testing.
Validates a number as defined by the CSS spec.
Represents a measurable length, with a string numeric magnitude and a unit.
static $allowedUnits
Array Lookup array of units recognized by CSS 3 @type array.
validate()
Validates the number and unit.
$isValid
Whether or not this length is valid.
compareTo($l)
Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal.
getUnit()
Retrieves string unit.
getN()
Retrieves string numeric magnitude.
__construct($n='0', $u=false)
$n
String numeric magnitude.
toString()
Returns string representation of number.
isValid()
Returns true if this length unit is valid.
Class for converting between different unit-lengths as specified by CSS.