1--TEST--
2Test imagecolorallocate() function : basic functionality
3--SKIPIF--
4<?php
5if(!extension_loaded('gd')) {
6    die('skip gd extension is not loaded');
7}
8if(!function_exists('imagecreatetruecolor')) {
9    die('skip imagecreatetruecolor function is not available');
10}
11?>
12--FILE--
13<?php
14echo "*** Testing imagecolorallocate() : basic functionality ***\n";
15
16$im = imagecreatetruecolor(200, 200);
17// Calling imagecolorallocate() with all possible arguments
18var_dump( imagecolorallocate($im, 255, 0, 0) );
19var_dump( imagecolorallocate($im, 0, 255, 0) );
20var_dump( imagecolorallocate($im, 0, 0, 255) );
21var_dump( imagecolorallocate($im, 255, 255, 255) );
22?>
23--EXPECT--
24*** Testing imagecolorallocate() : basic functionality ***
25int(16711680)
26int(65280)
27int(255)
28int(16777215)
29