mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-10 11:01:14 +00:00
Enable AVIF support in GD for PHP 8.1
This commit is contained in:
23
tests/mods/modules/gd/gd-avif.php
Normal file
23
tests/mods/modules/gd/gd-avif.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* This page should print 'OK' if everything works,
|
||||
* 'FAIL' or nothing if an error occured.
|
||||
*/
|
||||
ini_set('display_startup_errors', 1);
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(-1);
|
||||
|
||||
|
||||
// Only available since PHP 8.1.x
|
||||
if (version_compare($PHP_VERSION, '8.1.0', '<=')) {
|
||||
echo 'SKIP';
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// Check for support
|
||||
if (!function_exists('imageavif')) {
|
||||
echo 'FAIL: imageavif()';
|
||||
exit(1);
|
||||
}
|
||||
|
||||
echo 'OK';
|
||||
Reference in New Issue
Block a user