PHPSA\Variable::isNumeric PHP Method

isNumeric() public method

Is it an integer,double or number.
public isNumeric ( ) : boolean
return boolean
    public function isNumeric()
    {
        return $this->type & CompiledExpression::INTEGER || $this->type & CompiledExpression::DOUBLE || $this->type == CompiledExpression::NUMBER;
    }

Usage Example

Example #1
0
 public function testIsNumericMethodFalseOnBoolean()
 {
     $variable = new Variable('a', 1, CompiledExpression::BOOLEAN);
     static::assertFalse($variable->isNumeric());
 }