3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mostrarJPG($nombreImagen, $anchoImagen, $altoImagen) { header('Content-Type: text/html'); // Obtener los nuevos tamaños list($ancho, $alto) = getimagesize($nombreImagen); echo $alto; echo $ancho; 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); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://bbs.arkos.io/uploads/default/47/aa368ba90567d8c7.jpg); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // good edit, thanks! curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); // also, this seems wise considering output is image. $data = curl_exec($ch); curl_close($ch); mostrarJPG($data, 200, 300); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.6.140.0070.05718.28
5.6.130.0130.08318.18
5.6.120.0200.07021.14
5.6.110.0030.04721.14
5.6.100.0100.03320.99
5.6.90.0170.06720.96
5.6.80.0100.08020.51
5.5.300.0100.07017.98
5.5.290.0000.04317.98
5.5.280.0070.06720.74
5.5.270.0130.08020.89
5.5.260.0070.03720.88
5.5.250.0070.08020.69
5.5.240.0230.06720.13
5.4.450.0230.04719.59
5.4.440.0230.05019.34
5.4.430.0230.04719.18
5.4.420.0300.04019.20
5.4.410.0230.04719.07
5.4.400.0170.05019.07
5.4.390.0200.04719.08
5.4.380.0100.06019.38
5.4.370.0270.04319.30
5.4.360.0170.05319.01
5.4.350.0200.04719.10
5.4.340.0130.05319.38
5.4.320.0230.04318.84
5.4.310.0170.05019.14
5.4.300.0170.05019.15
5.4.290.0270.04019.06
5.4.280.0100.05719.26
5.4.270.0100.05319.30
5.4.260.0100.06319.25
5.4.250.0130.05019.37
5.4.240.0130.05319.14
5.4.230.0100.05319.25
5.4.220.0070.06019.25
5.4.210.0030.06319.25
5.4.200.0200.04319.15
5.4.190.0100.05319.14
5.4.180.0270.03719.13
5.4.170.0070.06319.14
5.4.160.0130.05319.29
5.4.150.0170.05018.82
5.4.140.0130.05316.54
5.4.130.0170.05316.43
5.4.120.0100.05316.55
5.4.110.0100.05716.63
5.4.100.0170.04716.27
5.4.90.0200.04316.42
5.4.80.0270.04016.41
5.4.70.0130.07316.63
5.4.60.0230.04316.58
5.4.50.0200.04316.55
5.4.40.0130.05316.57
5.4.30.0130.05316.54
5.4.20.0130.06016.40
5.4.10.0300.03716.57
5.4.00.0170.04715.79

preferences:
143.34 ms | 1398 KiB | 7 Q