ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
PHPMemoryLimit.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\ResourceStorage\Flavour\Engine
;
22
27
trait PHPMemoryLimit
28
{
29
public
function
getSizeLimitInBytes():
int
30
{
31
$memory_limit = ini_get(
'memory_limit'
);
32
if
(preg_match(
'/^(\d+)(.)$/'
, $memory_limit, $matches)) {
33
$memory_limit = match ($matches[2]) {
34
'K'
=> $matches[1] * 1024,
35
'M'
=> $matches[1] * 1024 * 1024,
36
'G'
=> $matches[1] * 1024 * 1024 * 1024,
37
default
=> $memory_limit,
38
};
39
}
40
return
(
int
) $memory_limit;
41
}
42
}
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ILIAS\ResourceStorage\Flavour\Engine
Definition:
DefaultEngines.php:21
components
ILIAS
ResourceStorage
src
Flavour
Engine
PHPMemoryLimit.php
Generated on Sun Oct 19 2025 23:03:29 for ILIAS by
1.9.4 (using
Doxyfile
)