mirror of
https://github.com/igorsimdyanov/php8.git
synced 2025-08-13 14:45:09 +00:00
16 lines
293 B
PHP
16 lines
293 B
PHP
<?php
|
|
class MinMax
|
|
{
|
|
public function __call(string $method, array $arr)
|
|
{
|
|
switch ($method) {
|
|
case 'min':
|
|
return min($arr);
|
|
case 'max':
|
|
return max($arr);
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
}
|