For the most part, what you have is correct. Two minor issues will need to be addressed to match the CLI result.
First
Move the setOption
line before reading any images in the Imagick
object.
$img = new Imagick();
$img->setOption('compose:args', '70x30');
$img->readImage("i.jpg");
// ...
Secound
Colorizing the black color to 100% usually results in a solid black image. For whatever reason, there's no effect with MagickColorizeImage method. There's some work-arounds using ImagickDraw
& background-color assignment listed within the comments on PHP.net's documentation. I'd recommend revisiting your first $clone1
image.