The *Absolute Error* metric is not listed as an available metric constant. However, you can still use it if needed by passing the internal constant definition for AE which is 1. This is useful when you wish to compare using a desired fuzz factor. Example:
<?php
$image1 = new imagick();
$image2 = new imagick();
$image1->SetOption('fuzz', '2%');
$image1->readImage("php_step29_actual.png");
$image2->readImage("php_step29_correct.png");
$result = $image1->compareImages($image2, 1);
echo "The image comparison 2% Fuzz factor is: " . $result[1];
?>