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)
8.3.60.0120.00316.63
8.3.50.0110.00822.05
8.3.40.0120.00318.84
8.3.30.0070.00718.79
8.3.20.0050.00320.34
8.3.10.0070.01123.57
8.3.00.0070.00417.63
8.2.180.0120.00618.52
8.2.170.0110.00422.96
8.2.160.0070.00720.34
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0110.00017.63
8.2.110.0030.00620.38
8.2.100.0090.00317.68
8.2.90.0000.00919.05
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0080.00021.10
8.2.30.0040.00420.59
8.2.20.0070.00017.69
8.2.10.0000.00717.88
8.2.00.0000.00818.01
8.1.280.0100.01025.92
8.1.270.0070.00723.81
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.95
8.1.230.0110.00017.66
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0030.00618.86
8.1.160.0070.00021.95
8.1.150.0000.00718.77
8.1.140.0000.00819.46
8.1.130.0030.00317.49
8.1.120.0030.00317.31
8.1.110.0080.00017.30
8.1.100.0040.00417.34
8.1.90.0030.00617.27
8.1.80.0030.00617.36
8.1.70.0000.00717.36
8.1.60.0060.00317.41
8.1.50.0030.00617.46
8.1.40.0040.00417.34
8.1.30.0030.00617.48
8.1.20.0070.00017.61
8.1.10.0000.00717.41
8.1.00.0070.00017.31
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0000.00718.38
8.0.270.0030.00317.12
8.0.260.0060.00017.11
8.0.250.0030.00516.96
8.0.240.0000.00817.00
8.0.230.0030.00316.94
8.0.220.0030.00316.94
8.0.210.0040.00416.75
8.0.200.0000.00616.94
8.0.190.0030.00616.96
8.0.180.0000.00916.82
8.0.170.0000.00716.89
8.0.160.0000.00716.98
8.0.150.0000.00716.94
8.0.140.0040.00416.91
8.0.130.0000.00513.32
8.0.120.0000.00816.92
8.0.110.0070.00016.81
8.0.100.0000.00716.69
8.0.90.0000.00716.77
8.0.80.0060.01016.82
8.0.70.0070.00016.89
8.0.60.0050.00216.86
8.0.50.0040.00416.73
8.0.30.0140.00516.97
8.0.20.0120.00917.40
8.0.10.0000.00716.76
8.0.00.0100.00916.76
7.4.330.0000.00515.08
7.4.320.0030.00316.49
7.4.300.0000.00716.40
7.4.290.0030.00316.57
7.4.280.0030.00516.59
7.4.270.0070.00016.46
7.4.260.0030.00316.56
7.4.250.0050.00316.45
7.4.240.0030.00416.57
7.4.230.0030.00316.37
7.4.220.0100.01016.48
7.4.210.0090.00616.59
7.4.200.0040.00416.55
7.4.160.0100.00716.72
7.4.150.0090.00817.40
7.4.140.0120.00817.86
7.4.130.0050.01416.44
7.4.120.0120.00916.36
7.4.110.0090.00916.50
7.4.100.0150.00916.38
7.4.90.0120.00616.72
7.4.80.0110.01119.39
7.4.70.0140.00416.36
7.4.60.0070.01116.45
7.4.50.0040.00416.58
7.4.40.0100.01016.62
7.4.30.0090.00916.51
7.4.00.0130.00314.79
7.3.330.0000.00513.20
7.3.320.0060.00013.15
7.3.310.0030.00316.39
7.3.300.0030.00316.19
7.3.290.0090.00516.31
7.3.280.0050.01016.34
7.3.270.0060.01017.40
7.3.260.0090.00916.38
7.3.250.0100.00716.46
7.3.240.0130.00816.61
7.3.230.0080.00816.59
7.3.210.0100.00716.41
7.3.200.0080.00816.33
7.3.190.0000.01616.45
7.3.180.0040.01316.27
7.3.170.0120.00616.46
7.3.160.0060.01016.38
7.3.00.0040.01116.66
7.2.330.0070.01116.55
7.2.320.0100.01016.65
7.2.310.0140.01016.66
7.2.300.0130.00416.36
7.2.290.0190.00616.52
7.2.130.0060.00616.73
7.2.120.0080.00416.75
7.2.110.0030.00916.82
7.2.100.0030.01016.84
7.2.90.0070.00716.71
7.2.80.0120.00016.79
7.2.70.0000.01116.71
7.2.60.0070.00716.73
7.2.50.0040.00816.41
7.2.40.0100.00316.80
7.2.30.0030.00716.69
7.2.20.0080.00416.85
7.2.10.0070.00716.48
7.2.00.0050.00518.05
7.1.250.0070.00315.64
7.1.240.0070.00715.57
7.1.230.0060.00315.67
7.1.220.0070.00415.68
7.1.210.0070.00415.70
7.1.200.0050.00615.73
7.1.190.0060.00315.57
7.1.180.0050.00515.69
7.1.170.0000.01215.31
7.1.160.0050.00515.56
7.1.150.0030.00915.65
7.1.140.0030.01015.48
7.1.130.0070.00415.41
7.1.120.0000.00815.52
7.1.110.0030.00515.41
7.1.100.0040.00716.92
7.1.90.0060.00315.56
7.1.80.0040.00715.65
7.1.70.0100.00316.30
7.1.60.0050.01217.38
7.1.50.0150.00625.15
7.1.40.0110.00015.57
7.1.30.0030.01015.63
7.1.20.0100.00315.41
7.1.10.0000.01215.67
7.1.00.0070.04018.96
7.0.330.0030.00615.04
7.0.320.0030.00915.18
7.0.310.0080.00615.20
7.0.300.0060.00314.96
7.0.290.0040.01115.20
7.0.280.0030.00715.21
7.0.270.0040.00415.37
7.0.260.0060.00615.28
7.0.250.0000.01215.41
7.0.240.0030.01015.34
7.0.230.0070.00715.22
7.0.220.0070.00715.17
7.0.210.0060.00615.30
7.0.200.0040.01015.89
7.0.190.0000.01215.40
7.0.180.0030.00715.44
7.0.170.0040.00814.98
7.0.160.0000.01115.16
7.0.150.0000.00915.01
7.0.140.0090.00015.30
7.0.130.0050.00315.51
7.0.120.0060.00315.41
7.0.110.0040.00815.32
7.0.100.0030.00715.16
7.0.90.0030.00715.23
7.0.80.0000.00915.29
7.0.70.0070.00715.14
7.0.60.0050.04817.70
7.0.50.0020.04016.59
7.0.40.0080.03416.78
7.0.30.0270.02816.82
7.0.20.0030.03116.74
7.0.10.0150.02716.68
7.0.00.0040.02416.78
5.6.380.0090.00313.91
5.6.370.0060.00514.22
5.6.360.0000.01114.11
5.6.350.0000.01213.62
5.6.340.0030.00613.92
5.6.330.0040.00414.06
5.6.320.0150.00013.97
5.6.310.0050.00514.03
5.6.300.0070.00714.20
5.6.290.0070.00714.32
5.6.280.0050.03917.42
5.6.270.0070.00414.29
5.6.260.0060.00613.98
5.6.250.0080.00314.03
5.6.240.0070.00313.89
5.6.230.0060.00314.22
5.6.220.0000.01313.91
5.6.210.0050.03217.26
5.6.200.0050.03516.04
5.6.190.0080.02217.38
5.6.180.0150.03517.22
5.6.170.0140.02617.13
5.6.160.0060.02817.21
5.6.150.0070.03816.10
5.6.140.0030.02416.07
5.6.130.0080.02116.04
5.6.120.0070.02517.46
5.6.110.0140.03317.44
5.6.100.0070.04317.54
5.6.90.0050.02217.32
5.6.80.0090.03217.27
5.6.70.1950.02517.04
5.6.60.0040.00813.75
5.6.50.0070.00313.74
5.6.40.0000.01313.64
5.6.30.0080.00314.00
5.6.20.0060.01013.87
5.6.10.0030.00913.99
5.6.00.0070.00413.94
5.5.380.0000.01110.66
5.5.370.0000.00710.68
5.5.360.0070.00010.94
5.5.350.0130.01715.66
5.5.340.0050.04014.47
5.5.330.0070.03815.35
5.5.320.0150.03615.58
5.5.310.0180.04015.46
5.5.300.0050.04214.47
5.5.290.0060.03914.32
5.5.280.0050.04415.76
5.5.270.0020.02415.88
5.5.260.0040.03215.66
5.5.250.0100.04015.68
5.5.240.0100.04015.50
5.5.230.0050.00310.89
5.5.220.0060.00310.58
5.5.210.0000.00910.69
5.5.200.0050.00210.95
5.5.190.0000.00810.82
5.5.180.0070.00010.36
5.5.170.0090.00310.39
5.5.160.0000.00910.53
5.5.150.0070.00410.54
5.5.140.0030.00710.70
5.5.130.0060.00010.72
5.5.120.0030.00610.87
5.5.110.0040.00410.58
5.5.100.0060.00210.79
5.5.90.0080.00310.62
5.5.80.0000.01010.62
5.5.70.0060.00310.45
5.5.60.0000.00810.73
5.5.50.0000.00910.75
5.5.40.0000.01310.74
5.5.30.0080.00010.63
5.5.20.0000.01010.46
5.5.10.0070.00010.60
5.5.00.0000.00710.66
5.4.450.0290.03215.08
5.4.440.0280.03215.00
5.4.430.0420.02715.23
5.4.420.0380.03215.27
5.4.410.0460.02815.07
5.4.400.0400.03215.07
5.4.390.0250.03315.02
5.4.380.0270.03715.00
5.4.370.0370.03314.83
5.4.360.0330.03814.78
5.4.350.0330.02515.01
5.4.340.0350.03415.02
5.4.330.0040.00410.97
5.4.320.0270.03714.80
5.4.310.0330.03414.87
5.4.300.0500.02214.98
5.4.290.0430.03614.98
5.4.280.0370.02115.03
5.4.270.0350.03514.89
5.4.260.0480.02815.03
5.4.250.0400.02814.99
5.4.240.0400.03414.74
5.4.230.0380.03315.02
5.4.220.0400.03014.86
5.4.210.0410.02515.01
5.4.200.0330.03314.97
5.4.190.0430.02614.91
5.4.180.0330.03314.90
5.4.170.0350.03014.92
5.4.160.0330.02314.79
5.4.150.0380.03714.87
5.4.140.0260.03013.70
5.4.130.0280.02813.73
5.4.120.0320.02513.77
5.4.110.0370.02713.72
5.4.100.0270.03313.67
5.4.90.0400.02513.45
5.4.80.0410.02313.63
5.4.70.0280.02513.68
5.4.60.0410.04013.60
5.4.50.0470.03313.56
5.4.40.0280.02913.71
5.4.30.0370.03213.51
5.4.20.0270.03013.54
5.4.10.0290.03013.70
5.4.00.0320.02713.30

preferences:
56.97 ms | 401 KiB | 5 Q