3v4l.org

run code in 300+ PHP versions simultaneously
<?php $width = 2034; $height = 847; bcscale(5); $fig = (int) str_pad('1', 3, '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.40.0080.00818.67
8.3.30.0030.01018.89
8.3.20.0040.00420.27
8.3.10.0040.00423.59
8.3.00.0050.00319.68
8.2.170.0040.01122.96
8.2.160.0030.01019.33
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0050.00517.75
8.2.110.0030.00821.00
8.2.100.0120.00017.72
8.2.90.0050.00319.42
8.2.80.0030.00717.97
8.2.70.0030.00617.50
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0040.00418.35
8.2.30.0040.00418.11
8.2.20.0040.00417.74
8.2.10.0040.00418.18
8.2.00.0040.00418.21
8.1.270.0080.00020.32
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.45
8.1.230.0040.00720.84
8.1.220.0040.00417.91
8.1.210.0060.00318.97
8.1.200.0030.00617.38
8.1.190.0050.00317.13
8.1.180.0040.00418.10
8.1.170.0000.00818.89
8.1.160.0040.00418.84
8.1.150.0000.00718.88
8.1.140.0000.00817.36
8.1.130.0070.00017.57
8.1.120.0070.00017.46
8.1.110.0050.00317.46
8.1.100.0070.00017.37
8.1.90.0000.00817.46
8.1.80.0040.00417.48
8.1.70.0030.00317.49
8.1.60.0050.00217.70
8.1.50.0030.00517.49
8.1.40.0000.00817.62
8.1.30.0030.00517.68
8.1.20.0030.00617.74
8.1.10.0080.00017.52
8.1.00.0040.00417.55
8.0.300.0040.00420.10
8.0.290.0000.00816.88
8.0.280.0000.00718.49
8.0.270.0030.00317.36
8.0.260.0040.00417.24
8.0.250.0040.00417.03
8.0.240.0050.00316.91
8.0.230.0070.00016.97
8.0.220.0040.00416.88
8.0.210.0050.00316.88
8.0.200.0040.00416.81
8.0.190.0090.00016.86
8.0.180.0080.00416.83
8.0.170.0000.00716.76
8.0.160.0040.00416.85
8.0.150.0040.00416.91
8.0.140.0000.00716.80
8.0.130.0000.00513.40
8.0.120.0070.00016.90
8.0.110.0030.00616.89
8.0.100.0000.00716.83
8.0.90.0040.00416.77
8.0.80.0060.00816.86
8.0.70.0000.00716.77
8.0.60.0030.00516.72
8.0.50.0040.00416.85
8.0.30.0100.00817.20
8.0.20.0070.01117.40
8.0.10.0040.00416.89
8.0.00.0090.00816.77
7.4.330.0060.00015.15
7.4.320.0000.00616.70
7.4.300.0000.00716.51
7.4.290.0000.00716.57
7.4.280.0040.00416.52
7.4.270.0050.00216.67
7.4.260.0000.00716.57
7.4.250.0000.00816.62
7.4.240.0040.00416.60
7.4.230.0000.00716.66
7.4.220.0060.01016.65
7.4.210.0080.01016.65
7.4.200.0040.00416.59
7.4.160.0060.01216.57
7.4.150.0180.00617.40
7.4.140.0060.01417.86
7.4.130.0140.00316.52
7.4.120.0080.00816.44
7.4.110.0110.00616.51
7.4.100.0120.00616.54
7.4.90.0170.00016.43
7.4.80.0070.01419.39
7.4.70.0130.00316.52
7.4.60.0070.01016.70
7.4.50.0020.00216.61
7.4.40.0080.00816.50
7.4.30.0090.00916.70
7.4.00.0030.01014.85
7.3.330.0020.00213.00
7.3.320.0000.00613.18
7.3.310.0000.00716.36
7.3.300.0030.00316.40
7.3.290.0070.00016.33
7.3.280.0080.00816.38
7.3.270.0120.00417.40
7.3.260.0060.01116.36
7.3.240.0070.01016.34
7.3.230.0140.00216.52
7.3.210.0130.00516.58
7.3.200.0110.00816.36
7.3.190.0160.00616.33
7.3.180.0100.00516.35
7.3.170.0140.00916.41
7.3.160.0140.00316.43
7.3.10.0070.00916.46
7.3.00.0000.00916.43
7.2.330.0090.00916.43
7.2.320.0060.01216.67
7.2.310.0040.01216.62
7.2.300.0100.00716.54
7.2.290.0060.01216.56
7.2.130.0050.00916.89
7.2.120.0070.00816.76
7.2.110.0080.01016.73
7.2.100.0080.00516.64
7.2.90.0130.00516.79
7.2.80.0050.01116.59
7.2.70.0090.00916.79
7.2.60.0100.00416.50
7.2.50.0130.00416.64
7.2.40.0100.01016.55
7.2.30.0100.00616.75
7.2.20.0100.00616.71
7.2.10.0060.01316.69
7.2.00.0050.00617.72
7.1.250.0040.00915.47
7.1.200.0070.00315.73
7.1.100.0050.00518.12
7.1.70.0040.00417.20
7.1.60.0140.01119.17
7.1.50.0000.01116.87
7.1.00.0100.06722.54
7.0.200.0030.00616.94
7.0.60.0070.08719.94
7.0.50.0030.08717.95
7.0.40.0030.04319.90
7.0.30.0470.04020.16
7.0.20.0230.07720.20
7.0.10.0100.06019.99
7.0.00.0070.04020.01
5.6.280.0100.04020.78
5.6.210.0130.05320.47
5.6.200.0070.05318.19
5.6.190.0070.08320.56
5.6.180.3530.04320.28
5.6.170.0370.06320.33
5.6.160.0100.03720.44
5.6.150.0100.08018.21
5.6.140.0100.03318.11
5.6.130.0030.04318.16
5.6.120.0200.07021.03
5.6.110.0130.07720.97
5.6.100.0030.04020.99
5.6.90.0000.06721.07
5.6.80.0030.08320.40
5.6.70.3400.04320.27
5.5.350.0100.07320.41
5.5.340.0070.08017.92
5.5.330.0000.06320.43
5.5.320.0270.06020.27
5.5.310.0300.07320.30
5.5.300.0000.04317.91
5.5.290.0100.08017.97
5.5.280.0130.06320.89
5.5.270.0100.08020.78
5.5.260.0130.08020.76
5.5.250.0130.05720.69
5.5.240.0230.04020.28
5.4.450.0900.06319.52
5.4.440.0870.06319.13
5.4.430.1030.05019.49
5.4.420.0900.05019.14
5.4.410.0970.04719.50
5.4.400.0830.05319.16
5.4.390.0870.04718.77
5.4.380.0870.05719.16
5.4.370.0470.06319.20
5.4.360.0700.05319.11
5.4.350.0700.06018.79
5.4.340.0570.05718.77
5.4.320.0800.04319.22
5.4.310.0630.05719.17
5.4.300.0900.06319.14
5.4.290.0700.05719.21
5.4.280.0630.06019.14
5.4.270.0770.06319.21
5.4.260.0800.05719.30
5.4.250.0730.06718.98
5.4.240.0900.05318.91
5.4.230.0670.06019.27
5.4.220.0770.05719.13
5.4.210.0670.06019.30
5.4.200.0830.06018.92
5.4.190.0830.05319.30
5.4.180.0770.06019.13
5.4.170.0700.06019.16
5.4.160.0600.06318.94
5.4.150.0730.05719.09
5.4.140.0770.05316.34
5.4.130.0670.06316.47
5.4.120.0800.05016.44
5.4.110.0600.05016.50
5.4.100.0630.06016.52
5.4.90.0570.06316.41
5.4.80.0600.06016.43
5.4.70.0130.03316.29
5.4.60.0270.06316.19
5.4.50.0100.06316.16
5.4.40.0130.04016.39
5.4.30.0030.03716.23
5.4.20.0370.03716.45

preferences:
37.4 ms | 400 KiB | 5 Q