3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mostrarJPG($nombreImagen, $anchoImagen, $altoImagen) { header('Content-Type: image/jpeg'); // Obtener los nuevos tamaños list($ancho, $alto) = getimagesize($nombreImagen); if($anchoImagen == 0) { $anchoImagen = $ancho; } if($altoImagen == 0) { $altoImagen = $alto; } // Cargar $thumb = imagecreatetruecolor($anchoImagen, $altoImagen); imagealphablending( $thumb, false ); imagesavealpha( $thumb, true ); $origen = imagecreatefromjpeg($nombreImagen); // Cambiar el tamaño imagecopyresized($thumb, $origen, 0, 0, 0, 0, $anchoImagen, $altoImagen, $ancho, $alto); // Imprimir imagejpeg($thumb); } //mostrarJPG("http://365.clarin.com/wp-content/uploads/2014/11/100_Chungo.jpg", 200, 300); mostrarJPG("https://bbs.arkos.io/uploads/default/47/aa368ba90567d8c7.jpg", 200, 300); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: getimagesize(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/Ouc2L on line 7 Warning: getimagesize(): open_basedir restriction in effect. File(https://bbs.arkos.io/uploads/default/47/aa368ba90567d8c7.jpg) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Ouc2L on line 7 Warning: getimagesize(https://bbs.arkos.io/uploads/default/47/aa368ba90567d8c7.jpg): Failed to open stream: Operation not permitted in /in/Ouc2L on line 7 Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() in /in/Ouc2L:16 Stack trace: #0 /in/Ouc2L(29): mostrarJPG('https://bbs.ark...', 200, 300) #1 {main} thrown in /in/Ouc2L on line 16
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.31 ms | 402 KiB | 8 Q