What are the differences in syntax and parameters between imagecreate and imagecreatetruecolor functions in PHP?

The main difference between the imagecreate() and imagecreatetruecolor() functions in PHP is that imagecreate() creates a palette-based image, while imagecreatetruecolor() creates a true-color image. The imagecreatetruecolor() function requires two additional parameters specifying the width and height of the image, while imagecreate() does not require these parameters.

// Create a true-color image
$image = imagecreatetruecolor($width, $height);

// Create a palette-based image
$image = imagecreate();