3declare(strict_types=1);
7use InvalidArgumentException;
32 if (!preg_match(
'#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) {
33 throw new InvalidArgumentException(sprintf(
'Don\'t understand "%s" as a number test.', $test));
38 throw new InvalidArgumentException(sprintf(
'Invalid number "%s".',
$target));
41 if (isset($matches[3])) {
42 switch (strtolower($matches[3])) {
setOperator(string $operator)
setTarget(string $target)
__construct(string $test)