version_compare

Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Compares two "PHP-standardized" version number strings
<?php version_compare(string $version1, string $version2, ?string $operator = null): int|bool
<?php         try {

            if ($image->dirname && $image->basename) {

                $stream = $image->dirname . '/' . $image->basename;

            } elseif (version_compare(PHP_VERSION, '7.2.0', '>=')) {


                $stream = $image->stream()->detach();

            } else {
<?php     {

        if ($this->app instanceof LumenApplication) {

            $provider = '\Intervention\Image\ImageServiceProviderLumen';

        } elseif (version_compare(IlluminateApplication::VERSION, '5.0', '<')) {

            $provider = '\Intervention\Image\ImageServiceProviderLaravel4';

        } else {

            $provider = '\Intervention\Image\ImageServiceProviderLaravelRecent';