3v4l.org

run code in 300+ PHP versions simultaneously
<?php $width = 2034; $height = 847; bcscale(5); $fig = (int) str_pad('1', 4, '0'); $ratio = (ceil(bcdiv(bcdiv(1200, bcdiv($width, 100)) , 100) * $fig) / $fig); var_dump($ratio); $newWidth = bcmul($width, $ratio); $newHeight = bcmul($height, $ratio); var_dump($newWidth); var_dump($newHeight);

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.0040.01818.43
8.3.50.0110.01116.13
8.3.40.0040.01118.53
8.3.30.0080.00818.90
8.3.20.0030.00620.29
8.3.10.0040.00423.79
8.3.00.0000.00819.79
8.2.180.0080.00816.50
8.2.170.0030.01222.96
8.2.160.0100.00320.45
8.2.150.0050.00324.18
8.2.140.0110.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00517.63
8.2.110.0030.00721.12
8.2.100.0040.00717.82
8.2.90.0050.00319.35
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0050.00719.41
8.2.30.0040.00419.95
8.2.20.0000.00817.73
8.2.10.0000.00718.24
8.2.00.0040.00418.05
8.1.280.0170.00325.92
8.1.270.0000.00820.28
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0060.00322.19
8.1.230.0040.00717.45
8.1.220.0000.00817.91
8.1.210.0000.00818.77
8.1.200.0000.01117.35
8.1.190.0040.00417.35
8.1.180.0030.00518.10
8.1.170.0050.00318.77
8.1.160.0020.00522.01
8.1.150.0030.00518.85
8.1.140.0030.00517.57
8.1.130.0030.00317.70
8.1.120.0040.00417.35
8.1.110.0040.00417.51
8.1.100.0000.00717.35
8.1.90.0040.00417.49
8.1.80.0000.00917.50
8.1.70.0040.00417.51
8.1.60.0040.00417.69
8.1.50.0030.00617.63
8.1.40.0080.00017.59
8.1.30.0000.00817.54
8.1.20.0070.00017.76
8.1.10.0000.00717.57
8.1.00.0070.00017.48
8.0.300.0000.00718.77
8.0.290.0070.00016.88
8.0.280.0030.00318.37
8.0.270.0030.00317.23
8.0.260.0030.00317.23
8.0.250.0000.00717.02
8.0.240.0050.00317.03
8.0.230.0070.00016.87
8.0.220.0030.00316.85
8.0.210.0050.00216.89
8.0.200.0000.00616.82
8.0.190.0070.00316.89
8.0.180.0080.00316.86
8.0.170.0040.00416.81
8.0.160.0030.00316.92
8.0.150.0030.00316.80
8.0.140.0030.00516.84
8.0.130.0050.00013.30
8.0.120.0040.00416.82
8.0.110.0080.00016.86
8.0.100.0040.00416.92
8.0.90.0040.00416.76
8.0.80.0040.01116.93
8.0.70.0070.00016.74
8.0.60.0000.00716.84
8.0.50.0050.00316.70
8.0.30.0090.00917.05
8.0.20.0060.01217.40
8.0.10.0030.00516.88
8.0.00.0070.01116.88
7.4.330.0000.00515.09
7.4.320.0060.00016.70
7.4.300.0000.00616.68
7.4.290.0060.00316.69
7.4.280.0030.00616.55
7.4.270.0000.00716.67
7.4.260.0000.00716.61
7.4.250.0060.00316.62
7.4.240.0070.00016.65
7.4.230.0050.00216.36
7.4.220.0070.01016.46
7.4.210.0000.01616.73
7.4.200.0070.00016.54
7.4.160.0070.01016.43
7.4.150.0190.00317.40
7.4.140.0180.01617.86
7.4.130.0090.00816.46
7.4.120.0110.00916.49
7.4.110.0060.01016.62
7.4.100.0070.01116.63
7.4.90.0060.01516.53
7.4.80.0110.00719.39
7.4.70.0130.01016.64
7.4.60.0080.01116.38
7.4.50.0090.00016.65
7.4.40.0120.00916.55
7.4.30.0070.01016.58
7.4.00.0060.00614.90
7.3.330.0050.00013.17
7.3.320.0050.00013.02
7.3.310.0070.00016.21
7.3.300.0040.00416.36
7.3.290.0100.00716.37
7.3.280.0080.00916.40
7.3.270.0100.00717.40
7.3.260.0110.00716.66
7.3.250.0110.00816.46
7.3.240.0080.00816.62
7.3.230.0070.01016.39
7.3.210.0090.00616.44
7.3.200.0140.00616.46
7.3.190.0070.01516.41
7.3.180.0090.00616.48
7.3.170.0100.00616.34
7.3.160.0080.01116.56
7.2.330.0130.00716.77
7.2.320.0150.00316.73
7.2.310.0160.00316.66
7.2.300.0050.01416.52
7.2.290.0140.00716.48
7.2.60.0000.01516.61
7.2.00.0030.00619.16
7.1.200.0060.00615.85
7.1.100.0060.00918.03
7.1.70.0070.00716.87
7.1.60.0100.01319.17
7.1.50.0230.01034.56
7.1.00.0070.07322.33
7.0.200.0130.00716.80
7.0.60.0030.04020.04
7.0.50.0070.03717.87
7.0.40.0070.08720.04
7.0.30.0370.07320.04
7.0.20.0270.03720.09
7.0.10.0100.07320.12
7.0.00.0170.07020.32
5.6.280.0030.03021.08
5.6.210.0070.08320.45
5.6.200.0000.04318.12
5.6.190.0030.08720.61
5.6.180.4000.04020.48
5.6.170.0230.07320.52
5.6.160.0130.07320.40
5.6.150.0030.05718.11
5.6.140.0100.06718.11
5.6.130.0000.04318.18
5.6.120.0030.09021.00
5.6.110.0130.07320.98
5.6.100.0170.07020.98
5.6.90.0170.07720.96
5.6.80.0070.06020.53
5.6.70.4470.03320.52
5.5.350.0000.03320.38
5.5.340.0000.04717.93
5.5.330.0030.06020.36
5.5.320.0330.06020.27
5.5.310.0300.04720.20
5.5.300.0000.04717.97
5.5.290.0030.04018.02
5.5.280.0070.07720.87
5.5.270.0100.06720.79
5.5.260.0070.04020.86
5.5.250.0100.04320.66
5.5.240.0270.07720.16
5.4.450.0670.07319.14
5.4.440.0770.05319.27
5.4.430.0770.04719.47
5.4.420.0700.05319.60
5.4.410.0630.06319.36
5.4.400.0670.06319.15
5.4.390.0930.05019.14
5.4.380.0700.06019.20
5.4.370.0970.05318.80
5.4.360.1030.04719.12
5.4.350.0530.06319.28
5.4.340.0700.07019.13
5.4.320.0100.06318.95
5.4.310.0070.06319.10
5.4.300.0770.05019.25
5.4.290.0770.05319.31
5.4.280.0800.05318.95
5.4.270.0770.05319.08
5.4.260.0630.04019.02
5.4.250.0170.04719.19
5.4.240.0200.06718.91
5.4.230.0830.07019.29
5.4.220.0870.07319.30
5.4.210.0200.07019.07
5.4.200.0030.07319.15
5.4.190.1000.06019.14
5.4.180.0870.05019.00
5.4.170.0930.06319.30
5.4.160.0830.05019.17
5.4.150.1070.05319.20
5.4.140.0900.04716.29
5.4.130.0900.05016.18
5.4.120.0900.06016.25
5.4.110.0870.05016.16
5.4.100.0970.05316.49
5.4.90.1100.06016.49
5.4.80.0900.06716.30
5.4.70.0170.07316.37
5.4.60.0230.03716.47
5.4.50.0100.07016.38
5.4.40.0230.06316.04
5.4.30.0000.05016.36
5.4.20.0330.07016.38

preferences:
85.35 ms | 400 KiB | 5 Q