1--TEST--
2imagecolorclosesthwb() test
3--SKIPIF--
4<?php
5	if(!extension_loaded('gd')){ die('skip: gd extension not available'); }
6	if(!function_exists('imagecolorclosesthwb')){ die('skip: imagecolorclosesthwb() not available'); }
7?>
8--FILE--
9<?php
10	$im = imagecreatefrompng(dirname(__FILE__).'/test.png');
11
12	var_dump(imagecolorclosesthwb($im, 255, 50, 0));
13
14	var_dump(imagecolorclosesthwb(NULL));
15	var_dump(imagecolorclosesthwb(NULL, NULL, NULL, NULL));
16	var_dump(imagecolorclosesthwb($im, "hello", "from", "gd"));
17
18	imagedestroy($im);
19?>
20--EXPECTF--
21int(16724480)
22
23Warning: imagecolorclosesthwb() expects exactly 4 parameters, 1 given in %s on line %d
24NULL
25
26Warning: imagecolorclosesthwb() expects parameter 1 to be resource, null given in %s on line %d
27NULL
28
29Warning: imagecolorclosesthwb() expects parameter 2 to be long, string given in %s on line %d
30NULL
31