From c1e4f9f30563d5eda1718d716d631d6092cd4e28 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 25 Jan 2018 23:06:53 +0100 Subject: Use type casting instead of *val() method It should be up to 6x faster Signed-off-by: Morris Jobke --- lib/private/LargeFileHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/LargeFileHelper.php') diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index 9f18a6acd6b..ea848f83622 100644 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -50,7 +50,7 @@ class LargeFileHelper { * PHP platform. */ public function __construct() { - $pow_2_53 = floatval(self::POW_2_53_MINUS_1) + 1.0; + $pow_2_53 = (float)self::POW_2_53_MINUS_1 + 1.0; if ($this->formatUnsignedInteger($pow_2_53) !== self::POW_2_53) { throw new \RuntimeException( 'This class assumes floats to be double precision or "better".' -- cgit v1.2.3