$img = @imagecreatetruecolor(32, 32) or return false;
Why doesn't this work?
I get a parse error, but the code looks ok?
The same with this:
imagefill($img, 0, 0, $transparent) or return false;
$img = @imagecreatetruecolor(32, 32) or return false;
Why doesn't this work?
I get a parse error, but the code looks ok?
The same with this:
imagefill($img, 0, 0, $transparent) or return false;
You can't use return like this. You must use an if statement instead:
if (!$img = @imagecreatetruecolor(32, 32)) {
return false;
}