Thruway\Common\Utils::checkPrecision PHP Method

checkPrecision() public static method

Changes the Precision for PHP configs that default to less than 16
public static checkPrecision ( )
    public static function checkPrecision()
    {
        if (ini_get('precision') < 16) {
            Logger::notice(null, 'Changing PHP precision from ' . ini_get('precision') . ' to 16');
            ini_set('precision', 16);
        }
    }

Usage Example

示例#1
0
 /**
  * Constructor
  *
  * @param \React\EventLoop\LoopInterface $loop
  */
 public function __construct(LoopInterface $loop = null)
 {
     Utils::checkPrecision();
     $this->loop = $loop ?: Factory::create();
     $this->realmManager = new RealmManager();
     $this->eventDispatcher = new EventDispatcher();
     $this->eventDispatcher->addSubscriber($this);
     $this->registerModule($this->realmManager);
     Logger::debug($this, "New router created");
 }
All Usage Examples Of Thruway\Common\Utils::checkPrecision