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); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: getimagesize(): php_network_getaddresses: getaddrinfo for 365.clarin.com failed: System error in /in/PJTJn on line 7 Warning: getimagesize(http://365.clarin.com/wp-content/uploads/2014/11/100_Chungo.jpg): Failed to open stream: php_network_getaddresses: getaddrinfo for 365.clarin.com failed: System error in /in/PJTJn on line 7 Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() in /in/PJTJn:16 Stack trace: #0 /in/PJTJn(28): mostrarJPG('http://365.clar...', 200, 300) #1 {main} thrown in /in/PJTJn 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:
48.89 ms | 402 KiB | 8 Q