xref: /PHP-7.4/ext/gd/tests/types.phpt (revision ded3d984)
1--TEST--
2imagetypes
3--SKIPIF--
4<?php
5        if (!function_exists('imagetypes')) die("skip gd extension not available\n");
6?>
7--FILE--
8<?php
9$flags = imagetypes();
10
11if ($flags&0x1 && !function_exists("imagegif")) {
12	echo "gif failed\n";
13}
14
15if ($flags&0x2 && !function_exists("imagejpeg")) {
16	echo "jpeg failed\n";
17}
18
19if ($flags&0x4 && !function_exists("imagepng")) {
20	echo "png failed\n";
21}
22
23if ($flags&0x8 && !function_exists("imagewbmp")) {
24	echo "wbmp failed\n";
25}
26
27if ($flags&16 && !function_exists("imagecreatefromxpm")) {
28	echo "xom failed\n";
29}
30echo "ok\n";
31?>
32--EXPECT--
33ok
34