<?php
declare(strict_types=1);

$source = imagecreatetruecolor(4, 4);
$target = imagecreate(2, 2);
imagecolorallocate($target, 0, 0, 0);
echo imagesx($source) === imagesx($target) && imagesy($source) === imagesy($target) ? "match allowed\n" : "resize first\n";
