# tablepress/3.4/libraries/vendor/PhpSpreadsheet/Shared/IntOrFloat.php

TablePress – Tables in WordPress made easy, version 3.4. 20 lines.

- Page: https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Shared/IntOrFloat.php
- Raw: https://pluginprobe.com/plugins/tablepress/3.4/raw/libraries/vendor/PhpSpreadsheet/Shared/IntOrFloat.php
- Modified: 2025-04-29T05:06:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Shared/IntOrFloat.php#L10-L20`.

```php
<?php

namespace TablePress\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.
				 * @param float|int $value
				 * @return float|int
				 */
				public static function evaluate($value)
	{
		$iValue = (int) $value;

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

```
