1--TEST--
2Testing imagecolordeallocate() of GD library with Out of range integers (Above)
3--CREDITS--
4Rafael Dohms <rdohms [at] gmail [dot] com>
5#testfest PHPSP on 2009-06-20
6--EXTENSIONS--
7gd
8--FILE--
9<?php
10require_once __DIR__ . '/func.inc';
11
12$image = imagecreate(180, 30);
13$white = imagecolorallocate($image, 255, 255, 255);
14
15$totalColors = imagecolorstotal($image);
16
17trycatch_dump(
18    fn() => imagecolordeallocate($image, $totalColors + 100)
19);
20
21?>
22--EXPECT--
23!! [ValueError] imagecolordeallocate(): Argument #2 ($color) must be between 0 and 1
24