3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
$furni = imagecreatefrompng("http://www.bubblews.com/assets/images/news/234286842_1369263526.jpg"); $furnix = imagesx($furni); $furniy = imagesy($furni); if($furnix < 180){ if($furniy < 180){ $img = imagecreatetruecolor(200, 200); }else{ $img = imagecreatetruecolor(200, ($furniy + 20)); } }else{ if($furniy < 180){ $img = imagecreatetruecolor(($furnix + 20), 200); }else{ $img = imagecreatetruecolor(($furnix + 20), $furniy + 20); } } imagefill($img, 0, 0, imagecolorallocate($img, 0, 0, 0)); //header('Content-type: image/png'); imagepng($img); imagedestroy($img);<?php
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.4.32
$furni = imagecreatefrompng("http://www.bubblews.com/assets/images/news/234286842_1369263526.jpg"); $furnix = imagesx($furni); $furniy = imagesy($furni); if($furnix < 180){ if($furniy < 180){ $img = imagecreatetruecolor(200, 200); }else{ $img = imagecreatetruecolor(200, ($furniy + 20)); } }else{ if($furniy < 180){ $img = imagecreatetruecolor(($furnix + 20), 200); }else{ $img = imagecreatetruecolor(($furnix + 20), $furniy + 20); } } imagefill($img, 0, 0, imagecolorallocate($img, 0, 0, 0)); //header('Content-type: image/png'); imagepng($img); imagedestroy($img);<?php