PHP 8.5.0 Alpha 4 available for testing

Voting

: max(nine, five)?
(Example: nine)

The Note You're Voting On

Sergey
12 years ago
If you don't sure whether the file exists or not or maybe it's broken, then you should use try - catch construction. It prevents code fails, when code stops execution after call of pingImage (if the file doesn't exist or it's broken).

<?php
$im
= new Imagick();
try {
$im->pingImage('3.jpg');
}
catch(
ImagickException $e) {
echo
"image doesn't exist";
}
?>

<< Back to user notes page

To Top