3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ratio = 1.583333333; $width = 960; $image_width = 3840; $image_height = 2560; $image_ratio = $image_width / $image_height; $width = ($image_ratio > $ratio) ? $image_width / $image_ratio : $width; $height = $width * $image_ratio; echo 'width:' . $width . ' / height:' . $height;

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.0060.01016.50
8.3.50.0140.00317.94
8.3.40.0040.01118.77
8.3.30.0030.01019.09
8.3.20.0040.00420.33
8.3.10.0030.00623.57
8.3.00.0050.00220.97
8.2.180.0120.00616.60
8.2.170.0140.00722.96
8.2.160.0100.00320.57
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00020.84
8.2.110.0060.00322.07
8.2.100.0080.00420.48
8.2.90.0080.00419.14
8.2.80.0030.00617.97
8.2.70.0070.00317.63
8.2.60.0080.00417.93
8.2.50.0070.00318.07
8.2.40.0050.00319.66
8.2.30.0000.00818.27
8.2.20.0000.00817.59
8.2.10.0040.00418.06
8.2.00.0000.00817.64
8.1.270.0030.00622.14
8.1.260.0020.00526.35
8.1.250.0070.00028.09
8.1.240.0060.00322.14
8.1.230.0100.00019.10
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0000.00818.72
8.1.160.0000.00722.01
8.1.150.0040.00418.55
8.1.140.0060.00317.49
8.1.130.0030.00317.93
8.1.120.0040.00417.48
8.1.110.0040.00417.45
8.1.100.0070.00017.46
8.1.90.0000.00817.48
8.1.80.0000.00717.52
8.1.70.0000.00717.43
8.1.60.0000.00817.63
8.1.50.0000.00817.54
8.1.40.0020.00517.48
8.1.30.0060.00317.57
8.1.20.0040.00417.67
8.1.10.0040.00417.50
8.1.00.0000.00717.30
8.0.300.0000.00718.77
8.0.290.0060.00316.63
8.0.280.0030.00318.40
8.0.270.0070.00017.16
8.0.260.0060.00017.25
8.0.250.0030.00516.94
8.0.240.0070.00016.96
8.0.230.0000.00816.81
8.0.220.0030.00316.79
8.0.210.0040.00416.88
8.0.200.0030.00316.85
8.0.190.0090.00316.95
8.0.180.0040.00416.80
8.0.170.0000.00816.83
8.0.160.0040.00416.82
8.0.150.0060.00616.73
8.0.140.0000.00716.73
8.0.130.0060.00013.29
8.0.120.0000.00816.88
8.0.110.0000.00716.93
8.0.100.0070.00016.84
8.0.90.0050.00216.76
8.0.80.0000.01516.84
8.0.70.0040.00417.00
8.0.60.0030.00516.88
8.0.50.0040.00416.89
8.0.30.0120.00817.09
8.0.20.0130.00817.40
8.0.10.0000.00817.01
8.0.00.0090.01016.91
7.4.330.0000.00515.09
7.4.320.0030.00316.55
7.4.300.0040.00416.43
7.4.290.0030.00316.64
7.4.280.0000.00716.50
7.4.270.0050.00316.52
7.4.260.0030.00616.59
7.4.250.0040.00416.47
7.4.240.0010.00616.48
7.4.230.0030.00316.61
7.4.220.0170.00416.46
7.4.210.0030.01716.40
7.4.200.0000.00716.35
7.4.160.0100.00716.58
7.4.150.0110.00717.40
7.4.140.0090.00917.86
7.4.130.0090.00816.41
7.4.120.0080.00916.54
7.4.110.0170.00016.33
7.4.100.0030.01316.37
7.4.90.0140.00316.55
7.4.80.0130.01019.39
7.4.70.0120.00616.39
7.4.60.0100.00616.28
7.4.50.0030.00616.24
7.4.40.0070.01116.52
7.4.30.0120.00416.38
7.4.00.0060.00914.86
7.3.330.0000.00513.14
7.3.320.0000.00713.02
7.3.310.0000.00816.32
7.3.300.0030.00316.37
7.3.290.0030.01016.32
7.3.280.0100.01016.36
7.3.270.0090.00917.40
7.3.260.0190.00016.30
7.3.250.0080.01316.37
7.3.240.0150.00716.45
7.3.230.0090.01216.39
7.3.210.0130.00316.37
7.3.200.0150.00019.39
7.3.190.0130.00316.50
7.3.180.0060.01316.28
7.3.170.0130.00716.39
7.3.160.0090.00916.63
7.3.120.0170.00014.75
7.2.330.0070.01016.77
7.2.320.0030.01816.66
7.2.310.0120.00416.71
7.2.300.0060.01016.84
7.2.290.0030.01416.45
7.1.100.0000.01118.20
7.1.70.0060.00317.19
7.1.60.0140.01019.70
7.1.50.0190.01616.88
7.1.00.0000.07322.28
7.0.200.0000.00716.79
7.0.140.0030.07322.07
7.0.100.0100.08020.02
7.0.90.0030.08319.80
7.0.80.0070.08020.08
7.0.70.0300.07319.93
7.0.60.0130.04019.93
7.0.50.0100.04720.28
7.0.40.0200.07020.04
7.0.30.0070.08720.09
7.0.20.0200.07020.02
7.0.10.0070.08720.14
7.0.00.0030.08720.00
5.6.280.0070.06721.06
5.6.250.0200.07320.70
5.6.240.0030.09720.65
5.6.230.0070.07020.62
5.6.220.0070.09720.42
5.6.210.0130.04320.61
5.6.200.0070.08721.04
5.6.190.0200.07721.06
5.6.180.0100.05721.02
5.6.170.0100.08321.05
5.6.160.0070.05021.09
5.6.150.0070.04321.00
5.6.140.0070.06721.02
5.6.130.0100.07320.91
5.6.120.0130.06320.99
5.6.110.0030.08720.99
5.6.100.0000.08720.95
5.6.90.0100.07020.92
5.6.80.0100.07320.39
5.6.70.0170.07020.41
5.6.60.0070.07320.43
5.6.50.0130.07720.50
5.6.40.0130.07020.36
5.6.30.0000.09020.33
5.6.20.0070.06320.32
5.6.10.0030.06020.34
5.6.00.0030.07320.24
5.5.380.0130.04020.30
5.5.370.0030.07320.51
5.5.360.0100.08320.29
5.5.350.0070.08020.36
5.5.340.0100.08320.83
5.5.330.0100.04720.77
5.5.320.0100.07020.88
5.5.310.0030.08720.68
5.5.300.0070.08020.66
5.5.290.0130.07020.58
5.5.280.0070.08320.82
5.5.270.0200.07320.84
5.5.260.0070.07720.73
5.5.250.0100.08020.64
5.5.240.0070.06320.14
5.5.230.0070.07319.97
5.5.220.0100.05320.16
5.5.210.0000.07720.25
5.5.200.0070.08320.22
5.5.190.0070.08020.09
5.5.180.0070.09020.20
5.5.160.0100.07320.13
5.5.150.0000.08320.10
5.5.140.0070.07320.11
5.5.130.0000.08320.13
5.5.120.0030.07320.07
5.5.110.0070.08319.93
5.5.100.0200.06320.11
5.5.90.0200.07720.11
5.5.80.0170.06320.06
5.5.70.0070.05020.07
5.5.60.0100.07320.10
5.5.50.0000.08019.91
5.5.40.0070.07319.98
5.5.30.0200.06320.10
5.5.20.0070.08019.90
5.5.10.0030.07719.91
5.5.00.0070.06319.98
5.4.450.0030.08319.43
5.4.440.0070.08019.36
5.4.430.0130.07719.11
5.4.420.0130.06719.43
5.4.410.0030.06019.25
5.4.400.0030.07719.26
5.4.390.0030.07719.17
5.4.380.0100.07719.05
5.4.370.0030.06319.07
5.4.360.0030.08019.15
5.4.350.0000.06319.12
5.4.340.0170.06719.04
5.4.320.0000.08318.98
5.4.310.0130.07019.16
5.4.300.0030.08719.10
5.4.290.0030.04719.06
5.4.280.0170.07019.04
5.4.270.0070.08019.11
5.4.260.0000.08018.96
5.4.250.0030.05319.13
5.4.240.0170.06319.23
5.4.230.0070.06719.02
5.4.220.0070.07718.78
5.4.210.0100.07718.98
5.4.200.0130.06318.96
5.4.190.0070.07319.13
5.4.180.0070.07018.80
5.4.170.0170.07019.05
5.4.160.0070.05018.77
5.4.150.0070.07319.12
5.4.140.0030.08016.25
5.4.130.0100.03716.32
5.4.120.0070.08016.31
5.4.110.0070.08316.44
5.4.100.0100.07016.33
5.4.90.0030.06016.44
5.4.80.0170.06316.33
5.4.70.0070.04016.24
5.4.60.0130.06316.33
5.4.50.0030.07316.19
5.4.40.0100.03716.24
5.4.30.0070.07316.36
5.4.20.0100.06716.30
5.4.10.0100.06016.36
5.4.00.0070.07315.76
5.3.290.0070.07714.53
5.3.280.0070.07714.46
5.3.270.0100.07014.57
5.3.260.0100.05714.60
5.3.250.0070.05314.59
5.3.240.0030.09314.61
5.3.230.0070.07314.46
5.3.220.0030.04714.51
5.3.210.0170.06714.53
5.3.200.0070.07314.56
5.3.190.0000.08014.41
5.3.180.0100.06014.56
5.3.170.0000.08314.48
5.3.160.0130.07314.38
5.3.150.0070.07714.56
5.3.140.0070.07014.52
5.3.130.0070.07314.51
5.3.120.0030.04314.49
5.3.110.0000.05014.53
5.3.100.0070.06313.91
5.3.90.0070.06313.89
5.3.80.0100.07013.79
5.3.70.0070.07314.00
5.3.60.0130.06314.00
5.3.50.0070.04013.94
5.3.40.0100.03013.80
5.3.30.0000.05713.85
5.3.20.0000.05013.68
5.3.10.0070.03713.52
5.3.00.0030.04013.61
5.2.170.0030.03010.99
5.2.160.0100.04711.11
5.2.150.0000.03711.21
5.2.140.0100.02311.18
5.2.130.0000.03011.09
5.2.120.0030.04010.96
5.2.110.0070.02710.89
5.2.100.0070.03310.95
5.2.90.0030.02711.17
5.2.80.0000.03010.94
5.2.70.0000.04011.09
5.2.60.0070.03310.86
5.2.50.0100.03710.96
5.2.40.0000.03310.94
5.2.30.0030.03310.84
5.2.20.0000.03010.80
5.2.10.0070.03310.84
5.2.00.0000.02710.63
5.1.60.0000.02310.04
5.1.50.0100.03010.06
5.1.40.0030.02310.05
5.1.30.0000.06010.26
5.1.20.0070.05010.35
5.1.10.0000.06310.05
5.1.00.0070.04010.05
5.0.50.0000.0208.79
5.0.40.0000.0478.79
5.0.30.0070.0478.79
5.0.20.0030.0178.79
5.0.10.0000.0238.79
5.0.00.0000.0508.79
4.4.90.0030.0208.79
4.4.80.0070.0108.79
4.4.70.0000.0178.79
4.4.60.0000.0208.79
4.4.50.0000.0178.79
4.4.40.0000.0238.79
4.4.30.0000.0238.79
4.4.20.0000.0178.79
4.4.10.0000.0278.79
4.4.00.0030.0208.79
4.3.110.0000.0378.79
4.3.100.0000.0208.79
4.3.90.0030.0178.79
4.3.80.0030.0378.79
4.3.70.0000.0178.79
4.3.60.0030.0138.79
4.3.50.0030.0138.79
4.3.40.0030.0238.79
4.3.30.0000.0138.79
4.3.20.0000.0138.79
4.3.10.0030.0138.79
4.3.00.0000.0178.79

preferences:
54.84 ms | 404 KiB | 6 Q