Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find highest value
<?php max(mixed $value, mixed ...$values): mixed
<?php         }



        $alpha = min($x, $y);

        $omega = max($x, $y);



        if ($value < $alpha || $value > $omega) {

            throw new InvalidArgumentException(
<?php                     }



                    if ($color->differs($checkColor, $tolerance)) {

                        $top_y = max(0, $y - $feather);

                        break 2;

                    }
<?php                     }



                    if ($color->differs($checkColor, $tolerance)) {

                        $top_x = max(0, $x - $feather);

                        break 2;

                    }
<?php         $width = $image->getWidth();

        $height = $image->getHeight();



        $image->getCore()->scaleImage(max(1, ($width / $size)), max(1, ($height / $size)));

        $image->getCore()->scaleImage($width, $height);



        return true;
<?php         $crop_width = min($width, ($crop_width + $feather * 2));

        $crop_height = min($height, ($crop_height + $feather * 2));

        $crop_x = max(0, ($crop_x - $feather));

        $crop_y = max(0, ($crop_y - $feather));
<?php         $crop_width = min($width, ($crop_width + $feather * 2));

        $crop_height = min($height, ($crop_height + $feather * 2));

        $crop_x = max(0, ($crop_x - $feather));

        $crop_y = max(0, ($crop_y - $feather));




        $image->getCore()->cropImage($crop_width, $crop_height, $crop_x, $crop_y);
<?php             }



            if ($constraint->isFixed(Constraint::ASPECTRATIO)) {

                $h = max(1, intval(round($this->width / $constraint->getSize()->getRatio())));



                if ($constraint->isFixed(Constraint::UPSIZE)) {

                    $this->height = ($h > $max_height) ? $max_height : $h;
<?php             }



            if ($constraint->isFixed(Constraint::ASPECTRATIO)) {

                $w = max(1, intval(round($this->height * $constraint->getSize()->getRatio())));



                if ($constraint->isFixed(Constraint::UPSIZE)) {

                    $this->width = ($w > $max_width) ? $max_width : $w;