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://pre365.365.com.ar/wp-content/uploads/2014/11/100_Chungo.jpg", 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)
8.3.60.0070.01116.88
8.3.50.0170.00522.05
8.3.40.0070.00719.27
8.3.30.0150.00419.05
8.3.20.0040.00420.58
8.3.10.0080.00023.90
8.3.00.0030.00719.52
8.2.180.0150.00416.59
8.2.170.0070.00722.96
8.2.160.0070.01020.61
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00817.88
8.2.110.0030.00922.45
8.2.100.0090.00318.18
8.2.90.0050.00319.42
8.2.80.0040.00417.97
8.2.70.0030.00617.88
8.2.60.0080.00017.93
8.2.50.0050.00318.07
8.2.40.0000.00821.13
8.2.30.0000.00720.71
8.2.20.0080.00018.02
8.2.10.0000.00718.14
8.2.00.0030.00518.14
8.1.280.0110.00325.92
8.1.270.0040.01223.93
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00621.12
8.1.230.0090.00317.93
8.1.220.0040.00417.80
8.1.210.0080.00018.77
8.1.200.0060.00317.50
8.1.190.0000.00817.48
8.1.180.0000.00918.10
8.1.170.0050.00319.13
8.1.160.0040.00422.13
8.1.150.0070.00019.01
8.1.140.0030.00619.66
8.1.130.0040.00417.96
8.1.120.0000.00717.61
8.1.110.0000.00717.56
8.1.100.0040.00417.64
8.1.90.0060.00317.61
8.1.80.0030.00517.48
8.1.70.0040.00417.60
8.1.60.0000.00817.75
8.1.50.0040.00417.65
8.1.40.0000.00817.64
8.1.30.0040.00417.78
8.1.20.0070.00017.89
8.1.10.0080.00017.81
8.1.00.0000.00817.69
8.0.300.0000.00819.09
8.0.290.0040.00416.88
8.0.280.0000.00718.55
8.0.270.0030.00317.44
8.0.260.0030.00317.42
8.0.250.0040.00417.05
8.0.240.0060.00317.18
8.0.230.0070.00017.09
8.0.220.0040.00416.97
8.0.210.0000.00717.03
8.0.200.0040.00417.07
8.0.190.0050.00317.14
8.0.180.0040.00417.05
8.0.170.0040.00416.92
8.0.160.0030.00616.93
8.0.150.0040.00417.11
8.0.140.0000.00716.96
8.0.130.0000.00613.48
8.0.120.0050.00317.10
8.0.110.0030.00516.97
8.0.100.0030.00517.13
8.0.90.0000.00817.08
8.0.80.0090.00617.20
8.0.70.0080.00017.10
8.0.60.0040.00417.18
8.0.50.0080.00017.19
8.0.30.0090.01017.40
8.0.20.0140.00517.45
8.0.10.0070.00017.38
8.0.00.0140.00417.00
7.4.330.0060.00015.39
7.4.320.0030.00316.73
7.4.300.0040.00416.66
7.4.290.0000.00816.71
7.4.280.0000.00716.72
7.4.270.0050.00216.86
7.4.260.0000.00816.62
7.4.250.0040.00416.84
7.4.240.0050.00316.86
7.4.230.0000.00716.60
7.4.220.0180.00316.77
7.4.210.0080.01116.70
7.4.200.0040.00416.66
7.4.160.0100.00716.76
7.4.150.0140.00417.40
7.4.140.0120.01117.86
7.4.130.0100.01416.80
7.4.120.0080.01016.77
7.4.110.0170.01016.73
7.4.100.0150.00316.76
7.4.90.0100.01016.64
7.4.80.0200.00319.39
7.4.70.0090.00916.73
7.4.60.0120.00616.67
7.4.50.0030.00516.59
7.4.40.0120.00616.86
7.4.30.0130.00616.89
7.4.00.0000.01715.30
7.3.330.0060.00013.44
7.3.320.0030.00313.61
7.3.310.0020.00516.55
7.3.300.0040.00416.54
7.3.290.0090.00816.65
7.3.280.0110.00716.65
7.3.270.0230.00017.40
7.3.260.0060.01316.63
7.3.240.0100.01316.72
7.3.230.0060.01216.57
7.3.210.0120.00616.64
7.3.200.0030.01316.65
7.3.190.0130.00516.73
7.3.180.0090.00916.77
7.3.170.0150.00716.77
7.3.160.0130.00616.62
7.3.10.0140.00416.39
7.3.00.0130.01316.67
7.2.330.0150.00316.83
7.2.320.0150.00316.69
7.2.310.0130.01016.69
7.2.300.0080.00816.66
7.2.290.0090.00916.79
7.2.130.0190.00516.55
7.2.120.0200.00316.84
7.2.110.0070.01016.54
7.2.100.0130.00316.67
7.2.90.0140.00316.73
7.2.80.0110.00416.12
7.2.70.0060.00916.84
7.2.60.0080.00816.81
7.2.50.0120.00016.86
7.2.40.0160.00016.55
7.2.30.0100.01016.32
7.2.20.0110.00816.40
7.2.10.0030.01416.54
7.2.00.0070.01118.17
7.1.250.0120.00615.38
7.1.200.0030.01216.05
7.1.100.0100.00318.59
7.1.70.0070.01017.50
7.1.60.0130.01319.11
7.1.50.0200.02034.90
7.1.00.0000.08022.91
7.0.200.0100.00316.97
7.0.60.0030.08320.48
7.0.50.0130.07318.21
7.0.40.0230.07320.53
7.0.30.0300.07720.55
7.0.20.0330.04320.50
7.0.10.0130.05720.48
7.0.00.0000.05020.48
5.6.210.0170.06321.19
5.6.200.0070.04318.48
5.6.190.0100.05321.13
5.6.180.0370.07021.07
5.6.170.0370.05720.94
5.6.160.0070.08320.85
5.6.150.0070.05718.48
5.6.140.0130.07318.56
5.6.130.0100.06318.65
5.6.120.0100.07721.50
5.6.110.0000.06721.28
5.6.100.0030.04721.53
5.6.90.0370.07021.50
5.6.80.0100.06320.73
5.6.70.1370.04320.63
5.5.350.0100.04320.84
5.5.340.0000.08018.39
5.5.330.0070.04020.86
5.5.320.0270.07720.89
5.5.310.0200.03720.68
5.5.300.0030.06018.41
5.5.290.0000.04718.28
5.5.280.0130.08021.20
5.5.270.0070.07321.28
5.5.260.0070.04021.25
5.5.250.0070.07020.82
5.5.240.0030.08720.39
5.4.450.0770.06020.00
5.4.440.0770.05719.99
5.4.430.0830.04719.88
5.4.420.0730.05320.03
5.4.410.0800.05720.05
5.4.400.0800.05019.64
5.4.390.0770.05319.72
5.4.380.0800.04319.68
5.4.370.0800.05019.68
5.4.360.0870.05319.73
5.4.350.0670.06319.80
5.4.340.0730.05319.61
5.4.320.0830.04719.80
5.4.310.0600.05319.80
5.4.300.0770.05019.66
5.4.290.0770.04719.66
5.4.280.0800.05019.66
5.4.270.0770.05019.91
5.4.260.0770.04719.59
5.4.250.0700.05719.59
5.4.240.0800.05019.77
5.4.230.0830.05319.81
5.4.220.0730.06019.71
5.4.210.0870.04019.71
5.4.200.0770.05019.64
5.4.190.0930.04019.70
5.4.180.0830.05319.81
5.4.170.0770.05019.79
5.4.160.0730.06319.65
5.4.150.0970.05319.56
5.4.140.0900.06016.96
5.4.130.0700.05317.07
5.4.120.0830.04017.05
5.4.110.0870.04017.09
5.4.100.0800.04717.21
5.4.90.0870.04317.21
5.4.80.0730.05017.03
5.4.70.0600.05716.94
5.4.60.0600.05017.05
5.4.50.0670.05317.00
5.4.40.0730.05017.14
5.4.30.0630.07017.06
5.4.20.0730.05716.93
5.4.10.0870.04317.02
5.4.00.0700.05316.51

preferences:
63.95 ms | 401 KiB | 5 Q