HEX
Server: LiteSpeed
System: Linux server137.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: bibuzptr (1123)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //home/bibuzptr/elearning.bibu-edu.us/admin/PhpSpreadsheet/src/PhpSpreadsheet/Shared/IntOrFloat.php
<?php

namespace PhpOffice\PhpSpreadsheet\Shared;

class IntOrFloat
{
    /**
     * Help some functions with large results operate correctly on 32-bit,
     * by returning result as int when possible, float otherwise.
     */
    public static function evaluate(float|int $value): float|int
    {
        $iValue = (int) $value;

        return ($value == $iValue) ? $iValue : $value;
    }
}