I want to check if any of the three functions inside the IF did not execute successfully. If any of them did not run, i want to get a return value false.
if($ext == "gif" or $ext == "png"){
imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127));
imagealphablending($new, false);
imagesavealpha($new, true);
}
For example I want to know if all the three functions imagecolortransparent, imagealphablending, imagesavealpha did execute successfully, if not, return false. Do i need to check each function like following or is there a better way?
if($ext == "gif" or $ext == "png"){
if (!@imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127)))
return false;
if (!@imagealphablending($new, false))
return false;
if (!@imagesavealpha($new, true))
return false;
}
Thanks.