--TEST-- imagefilter() function test --EXTENSIONS-- gd --SKIPIF-- --FILE-- getMessage() . PHP_EOL; } try { imagefilter($im, IMG_FILTER_SCATTER, 0, $val); } catch (\ValueError $e) { echo $e->getMessage() . PHP_EOL; } } ?> --EXPECTF-- imagefilter(): Argument #3 must be between 0 and %d imagefilter(): Argument #4 must be between 0 and %d imagefilter(): Argument #3 must be between 0 and %d imagefilter(): Argument #4 must be between 0 and %d