/ Published in: PHP
MacOS 10.6.5 PHP 5.3.3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $image = new Imagick; $image->newImage(700, 394, 'red'); $pid = pcntl_fork(); switch ($pid) { case 0: run(); exit; case -1: throw new Exception("fork failed!"); default: break; } function run() { $image = new Imagick; echo 'hey', PHP_EOL; $image->newImage(700, 394, 'blue'); echo 'doesnt reach...', PHP_EOL; $image->setImageFormat('jpeg'); $image->setCompressionQuality(90); $image->writeImage('/tmp/hoge.jpg'); }