1--TEST--
2Testing imagetruecolortopalette(): wrong parameters for parameter 3
3--CREDITS--
4Rafael Dohms <rdohms [at] gmail [dot] com>
5--SKIPIF--
6<?php
7    if (!extension_loaded("gd")) die("skip GD not present");
8    if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
9?>
10--FILE--
11<?php
12require __DIR__  . '/func.inc';
13
14$image = imagecreatetruecolor(50, 50);
15
16trycatch_dump(
17    fn() => imagetruecolortopalette($image, true, null)
18);
19
20?>
21--EXPECT--
22!! [ValueError] imagetruecolortopalette(): Argument #3 ($num_colors) must be greater than 0 and less than 2147483647
23