3v4l.org

run code in 300+ PHP versions simultaneously
$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 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
$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);
Output for 7.3.32 - 7.3.33
Parse error: syntax error, unexpected end of file in /in/FpOVt on line 20
Process exited with code 255.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.32, 7.2.29 - 7.2.33, 7.3.16 - 7.3.31
$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

preferences:
158.7 ms | 405 KiB | 256 Q