I am making an image morphing function, however I am encountering problems. I have an unexpected T_STRING at the commented line, which I'm sure is an embarrassingly simple error...
What's wrong? How can I avoid this in the future? Thanks.
function morph($img) {
$tempImg = $img;
$size = getimagesize($tempImg);
$width = $size[0];
$height = $size[1];
//Create the image background
imagefilledrectangle($tempImg, 0, 0, $width, $height, imagecolorallocate($tempImg, 0, 0, 0)); //ERROR, unexpectued T_STRING
return $tempImg;
}