HTMLPurifier_Length::toString PHP Method

toString() public method

Returns string representation of number.
public toString ( ) : string
return string
    public function toString()
    {
        if (!$this->isValid()) {
            return false;
        }
        return $this->n . $this->unit;
    }

Usage Example

Ejemplo n.º 1
0
 function testToString()
 {
     $l = new HTMLPurifier_Length('23', 'in');
     $this->assertIdentical($l->toString(), '23in');
 }