• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • UnderflowException()

    (PHP 5 >= 5.1.0, PHP 7)

    简介

    Exception thrown when performing an invalid operation on an empty container, such as removing an element.

    类摘要

    UnderflowExceptionextendsRuntimeException{/*继承的属性*/protectedstring $message;protectedint $code;protectedstring $file;protectedint $line;/*继承的方法*/
    finalpublicException::getMessage(void): string
    finalpublicException::getPrevious(void): Throwable
    finalpublicException::getCode(void): int
    finalpublicException::getFile(void): string
    finalpublicException::getLine(void): int
    finalpublicException::getTrace(void): array
    finalpublicException::getTraceAsString(void): string
    publicException::__toString(void): string
    finalprivateException::__clone(void): void
    }
    UnderflowException handles exceptions due to a value being too small to maintain precision, resulting in loss of accuracy. In PHP, this can occurs when using floats:
    echo (1-0.9) // 0.1
    echo (1-0.99) // 0.01
    echo (1-0.999) // 0.001
    echo (1-0.9999) // 9.9999999999989E-05
    echo (1-0.99999) // 9.9999999999545E-06
    echo (1-0.999999) // 1.0000000000288E-06