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