How To Check Imagick Extension Installed Or Not In Php

[Solved] How To Check Imagick Extension Installed Or Not In Php | Shell - Code Explorer | yomemimo.com
Question : How to check Imagick Extension installed or not in php

Answered by : ashir-ali-butt

<?php
$image = new Imagick();
$image->newImage(1, 1, new ImagickPixel('#ffffff'));
$image->setImageFormat('png');
$pngData = $image->getImagesBlob();
echo strpos($pngData, "\x89PNG\r\n\x1a\n") === 0 ? 'Ok' : 'Failed';

Source : https://mlocati.github.io/articles/php-windows-imagick.html | Last Update : Mon, 26 Sep 22

Answers related to how to check imagick extension installed or not in php

Code Explorer Popular Question For Shell