PHPSA\Variable::isNumeric PHP 메소드

isNumeric() 공개 메소드

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

Usage Example

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