3v4l.org

run code in 300+ PHP versions simultaneously
<?php function roundUpToNearestThousand($n) { return (int) (1000 * ceil($n/1000)); } var_dump( roundUpToNearestThousand(999), roundUpToNearestThousand(1000.001), roundUpToNearestThousand(1001), roundUpToNearestThousand(1100), roundUpToNearestThousand(1600), roundUpToNearestThousand(100010) );

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.4.20.0170.00318.67
8.4.10.0040.01217.70
8.3.150.0060.01216.47
8.3.140.0120.00616.44
8.3.130.0100.00716.49
8.3.120.0060.01018.80
8.3.110.0140.00316.48
8.3.100.0030.00816.33
8.3.90.0090.00626.77
8.3.80.0030.00619.36
8.3.70.0070.01018.43
8.3.60.0000.01616.63
8.3.50.0160.00521.09
8.3.40.0110.00418.63
8.3.30.0100.01018.58
8.3.20.0090.00020.78
8.3.10.0060.00321.86
8.3.00.0000.00917.93
8.2.260.0140.00418.58
8.2.250.0110.00416.68
8.2.240.0080.00017.07
8.2.230.0060.00320.94
8.2.220.0040.01237.54
8.2.210.0050.00326.77
8.2.200.0000.00918.88
8.2.190.0030.01018.04
8.2.180.0040.01116.50
8.2.170.0160.00622.96
8.2.160.0040.01122.08
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00719.30
8.2.120.0050.00226.35
8.2.110.0060.00322.38
8.2.100.0060.00917.78
8.2.90.0000.00917.63
8.2.80.0040.00418.73
8.2.70.0040.00419.65
8.2.60.0050.00318.03
8.2.50.0030.00618.10
8.2.40.0000.00820.59
8.2.30.0070.00019.20
8.2.20.0000.00818.04
8.2.10.0040.00417.93
8.2.00.0030.00517.68
8.1.310.0100.00718.21
8.1.300.0110.00717.61
8.1.290.0040.00430.84
8.1.280.0110.00725.92
8.1.270.0040.00423.92
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00322.11
8.1.230.0110.00017.64
8.1.220.0070.00317.79
8.1.210.0080.00018.77
8.1.200.0040.00417.22
8.1.190.0040.00417.22
8.1.180.0090.00018.10
8.1.170.0090.00018.65
8.1.160.0000.00722.20
8.1.150.0040.00418.82
8.1.140.0040.00419.39
8.1.130.0000.00717.41
8.1.120.0000.00717.40
8.1.110.0000.00817.43
8.1.100.0040.00417.46
8.1.90.0040.00417.42
8.1.80.0050.00317.44
8.1.70.0040.00417.33
8.1.60.0040.00417.55
8.1.50.0000.00817.45
8.1.40.0000.00817.52
8.1.30.0000.00817.62
8.1.20.0040.00417.61
8.1.10.0000.00717.38
8.1.00.0060.00317.49
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0040.00418.45
8.0.270.0050.00216.81
8.0.260.0000.00616.80
8.0.250.0000.00616.87
8.0.240.0030.00616.83
8.0.230.0000.00716.96
8.0.220.0030.00316.86
8.0.210.0030.00316.87
8.0.200.0030.00317.01
8.0.190.0040.00416.88
8.0.180.0030.00316.81
8.0.170.0000.00816.75
8.0.160.0070.00016.79
8.0.150.0000.00716.79
8.0.140.0000.00716.78
8.0.130.0000.00613.18
8.0.120.0080.00016.85
8.0.110.0000.00816.88
8.0.100.0000.00716.89
8.0.90.0000.00816.81
8.0.80.0060.01316.77
8.0.70.0040.00416.82
8.0.60.0040.00416.72
8.0.50.0040.00416.80
8.0.30.0070.01117.03
8.0.20.0120.00717.40
8.0.10.0070.00016.86
8.0.00.0030.01516.73
7.4.330.0050.00015.55
7.4.320.0000.00616.64
7.4.300.0040.00416.42
7.4.290.0030.00316.54
7.4.280.0040.00416.49
7.4.270.0070.00016.44
7.4.260.0000.00816.61
7.4.250.0050.00216.57
7.4.240.0000.00716.55
7.4.230.0000.00716.60
7.4.220.0000.00716.34
7.4.210.0070.01016.52
7.4.200.0000.00716.39
7.4.160.0030.01216.49
7.4.150.0100.00717.40
7.4.140.0120.00717.86
7.4.130.0120.00716.53
7.4.120.0110.00816.49
7.4.110.0060.01316.46
7.4.100.0070.01316.53
7.4.90.0130.00616.45
7.4.80.0100.00917.42
7.4.70.0100.00916.55
7.4.60.0070.01016.41
7.4.50.0060.01216.46
7.4.40.0110.00816.60
7.4.30.0110.00716.52
7.4.20.0050.01116.31
7.4.10.0100.00816.51
7.4.00.0130.00616.26
7.3.330.0050.00013.32
7.3.320.0000.00513.23
7.3.310.0020.00516.22
7.3.300.0050.00216.28
7.3.290.0030.00316.23
7.3.280.0060.01116.34
7.3.270.0140.00317.40
7.3.260.0120.00816.55
7.3.250.0050.01116.42
7.3.240.0090.01216.51
7.3.230.0090.01016.48
7.3.220.0150.00716.51
7.3.210.0100.00816.51
7.3.200.0090.00916.47
7.3.190.0130.00416.48
7.3.180.0080.00916.48
7.3.170.0130.00716.40
7.3.160.0080.00916.58
7.3.150.0070.00916.36
7.3.140.0100.00816.59
7.3.130.0100.00716.42
7.3.120.0100.00916.34
7.3.110.0090.01016.43
7.3.100.0120.00616.53
7.3.90.0070.01016.47
7.3.80.0090.00815.95
7.3.70.0100.00715.97
7.3.60.0070.00916.05
7.3.50.0090.00715.98
7.3.40.0110.00916.00
7.3.30.0100.00915.75
7.3.20.0340.00415.61
7.3.10.0250.00815.71
7.3.00.0240.01015.74
7.2.340.0130.00816.47
7.2.330.0080.01116.67
7.2.320.0120.00616.77
7.2.310.0050.01216.56
7.2.300.0100.01116.58
7.2.290.0060.01216.61
7.2.280.0090.01016.48
7.2.270.0070.01016.52
7.2.260.0080.01016.45
7.2.250.0080.00816.48
7.2.240.0100.01016.56
7.2.230.0130.00416.62
7.2.220.0080.01016.49
7.2.210.0100.00816.21
7.2.200.0090.00916.21
7.2.190.0090.00916.07
7.2.180.0090.01016.11
7.2.170.0090.00816.15
7.2.160.0070.01315.91
7.2.150.0290.01215.76
7.2.140.0270.00915.64
7.2.130.0250.00815.87
7.2.120.0230.00915.73
7.2.110.0280.00815.78
7.2.100.0270.01115.75
7.2.90.0330.01015.63
7.2.80.0330.00715.56
7.2.70.0440.00615.63
7.2.60.0260.01015.69
7.2.50.0410.00915.64
7.2.40.0640.00815.72
7.2.30.0390.00815.71
7.2.20.0270.01015.56
7.2.10.0230.01015.81
7.2.00.0540.00715.93
7.1.330.0230.00715.64
7.1.320.0270.00715.69
7.1.310.0240.00415.21
7.1.300.0300.00715.13
7.1.290.0260.01215.22
7.1.280.0230.00715.12
7.1.270.0300.00914.91
7.1.260.0320.01014.87
7.1.250.0310.00614.77
7.1.240.0380.01014.61
7.1.230.0400.00814.63
7.1.220.0340.01014.61
7.1.210.0540.01014.63
7.1.200.0470.01114.64
7.1.190.0320.01014.50
7.1.180.0460.00714.43
7.1.170.0680.01014.39
7.1.160.0320.00914.78
7.1.150.0480.01014.81
7.1.140.0810.00914.81
7.1.130.0660.00915.08
7.1.120.0410.01014.86
7.1.110.0480.00814.87
7.1.100.0720.00814.89
7.1.90.0370.00814.86
7.1.80.0550.00914.89
7.1.70.0300.01014.65
7.1.60.0360.01120.66
7.1.50.0500.00920.55
7.1.40.0470.00920.45
7.1.30.0440.01020.81
7.1.20.0600.00920.79
7.1.10.0490.00914.81
7.1.00.0340.00914.79
7.0.330.0370.00814.23
7.0.320.0370.00914.39
7.0.310.0440.00714.31
7.0.300.0290.00914.06
7.0.290.0290.00914.43
7.0.280.0330.00714.20
7.0.270.0520.00914.69
7.0.260.0480.00714.54
7.0.250.0700.00714.45
7.0.240.0380.01014.62
7.0.230.0400.00914.50
7.0.220.0660.00814.55
7.0.210.0200.01014.22
7.0.200.0250.01014.34
7.0.190.0330.00714.22
7.0.180.0410.00714.37
7.0.170.0370.00714.47
7.0.160.0490.00714.48
7.0.150.0370.00814.51
7.0.140.0350.00914.44
7.0.130.0440.01114.45
7.0.120.0520.00914.58
7.0.110.0340.00914.49
7.0.100.0350.00914.41
7.0.90.0460.00814.43
7.0.80.0370.01014.44
7.0.70.0530.00814.41
7.0.60.0450.00914.47
7.0.50.0490.00814.55
7.0.40.0390.00814.51
7.0.30.0300.01014.52
7.0.20.0280.00714.48
7.0.10.0470.00514.56
7.0.00.0340.01014.42
5.6.400.0200.00915.04
5.6.390.0140.01315.17
5.6.380.0200.00914.89
5.6.370.0160.01215.14
5.6.360.0190.00914.95
5.6.350.0160.01215.06
5.6.340.0190.01015.11
5.6.330.0200.01215.11
5.6.320.0200.01015.01
5.6.310.0210.00714.84
5.6.300.0160.02316.18
5.6.290.0160.02116.16
5.6.280.0160.02516.29
5.6.270.0170.02316.25
5.6.260.0180.02116.13
5.6.250.0170.02516.17
5.6.240.0180.02116.25
5.6.230.0180.02016.16
5.6.220.0180.02316.26
5.6.210.0170.02216.11
5.6.200.0170.02216.14
5.6.190.0160.02216.24
5.6.180.0150.02216.12
5.6.170.0190.02016.15
5.6.160.0170.02516.10
5.6.150.0170.02216.21
5.6.140.0200.02316.19
5.6.130.0190.02316.21
5.6.120.0180.02316.21
5.6.110.0160.02416.18
5.6.100.0160.02116.24
5.6.90.0200.01916.19
5.6.80.0160.02216.03
5.6.70.0140.02316.01
5.6.60.0150.02115.93
5.6.50.0170.02215.99
5.6.40.0140.02516.07
5.6.30.0150.02316.03
5.6.20.0160.02316.03
5.6.10.0170.02315.95
5.6.00.0170.02115.99
5.5.380.0240.00615.88
5.5.370.0320.00615.64
5.5.360.0220.00915.74
5.5.350.0170.01215.61
5.5.340.0210.01415.75
5.5.330.0170.01515.93
5.5.320.0320.00815.83
5.5.310.0240.01715.59
5.5.300.0250.01615.75
5.5.290.0260.01315.81
5.5.280.0250.01415.92
5.5.270.0340.00315.89
5.5.260.0180.01415.99
5.5.250.0230.00815.65
5.5.240.0210.01615.74
5.5.230.0210.01115.85
5.5.220.0180.01315.60
5.5.210.0130.01915.79
5.5.200.0180.01515.79
5.5.190.0250.00415.68
5.5.180.0220.01315.52
5.5.170.0250.00415.77
5.5.160.0260.00315.74
5.5.150.0250.00415.78
5.5.140.0150.01515.84
5.5.130.0190.01115.98
5.5.120.0180.01315.60
5.5.110.0230.01015.90
5.5.100.0110.01615.80
5.5.90.0230.00615.68
5.5.80.0190.01115.84
5.5.70.0210.01015.39
5.5.60.0280.00615.63
5.5.50.0070.02215.48
5.5.40.0230.00615.72
5.5.30.0210.01015.68
5.5.20.0290.00415.67
5.5.10.0210.01215.71
5.5.00.0280.00615.88
5.4.450.0240.00312.82
5.4.440.0130.01312.82
5.4.430.0220.00312.82
5.4.420.0160.00912.82
5.4.410.0250.00412.82
5.4.400.0220.00412.82
5.4.390.0160.01012.82
5.4.380.0070.01512.82
5.4.370.0240.00012.82
5.4.360.0200.00712.82
5.4.350.0150.00912.82
5.4.340.0130.01012.82
5.4.330.0200.00712.82
5.4.320.0260.00312.82
5.4.310.0180.00412.82
5.4.300.0170.00612.82
5.4.290.0100.01612.82
5.4.280.0160.00712.82
5.4.270.0130.01112.82
5.4.260.0130.01012.82
5.4.250.0230.00012.82
5.4.240.0110.01412.82
5.4.230.0120.01212.82
5.4.220.0230.00012.82
5.4.210.0170.00712.82
5.4.200.0160.01212.82
5.4.190.0110.01612.82
5.4.180.0180.00912.82
5.4.170.0220.00312.90
5.4.160.0150.00712.82
5.4.150.0140.00812.82
5.4.140.0120.01212.82
5.4.130.0150.00712.82
5.4.120.0140.00912.82
5.4.110.0220.00612.82
5.4.100.0060.01812.82
5.4.90.0220.00412.82
5.4.80.0150.00712.82
5.4.70.0170.00412.82
5.4.60.0120.00912.82
5.4.50.0140.00712.82
5.4.40.0180.00712.82
5.4.30.0130.01012.82
5.4.20.0230.00412.82
5.4.10.0100.01112.82
5.4.00.0190.00612.82
5.3.290.0210.00413.23
5.3.280.0190.00813.05
5.3.270.0250.00413.04
5.3.260.0090.01813.13
5.3.250.0120.00912.96
5.3.240.0150.01212.85
5.3.230.0210.00513.09
5.3.220.0130.01012.85
5.3.210.0150.01213.13
5.3.200.0130.01312.86
5.3.190.0160.00812.91
5.3.180.0220.00313.25
5.3.170.0170.00713.27
5.3.160.0090.01413.24
5.3.150.0130.01313.14
5.3.140.0100.01412.95
5.3.130.0150.00913.16
5.3.120.0150.01213.15
5.3.110.0180.01113.05
5.3.100.0180.00613.02
5.3.90.0200.00413.05
5.3.80.0170.00813.04
5.3.70.0120.01213.03
5.3.60.0150.00813.15
5.3.50.0200.00612.94
5.3.40.0230.00013.18
5.3.30.0160.01413.00
5.3.20.0220.00313.12
5.3.10.0130.00912.82
5.3.00.0220.00412.93
5.2.170.0170.00312.82
5.2.160.0130.00712.82
5.2.150.0130.00812.82
5.2.140.0170.00712.82
5.2.130.0140.00612.82
5.2.120.0110.00912.82
5.2.110.0080.01212.82
5.2.100.0170.00312.82
5.2.90.0160.00312.82
5.2.80.0150.00712.82
5.2.70.0070.01312.82
5.2.60.0130.00712.82
5.2.50.0100.01312.82
5.2.40.0120.00812.82
5.2.30.0090.00912.82
5.2.20.0120.00612.82
5.2.10.0090.00912.82
5.2.00.0130.00812.82
5.1.60.0100.00712.82
5.1.50.0110.00512.82
5.1.40.0090.00912.82
5.1.30.0120.00512.82
5.1.20.0160.00412.82
5.1.10.0170.00312.82
5.1.00.0210.00712.82
5.0.50.0130.00312.82
5.0.40.0060.00912.82
5.0.30.0090.00512.82
5.0.20.0150.00412.82
5.0.10.0080.00612.82
5.0.00.0080.00512.82
4.4.90.0130.00012.82
4.4.80.0100.00012.82
4.4.70.0040.00612.82
4.4.60.0110.00012.82
4.4.50.0070.00212.82
4.4.40.0030.00612.82
4.4.30.0090.00012.82
4.4.20.0090.00212.82
4.4.10.0080.00412.82
4.4.00.0040.00412.82
4.3.110.0050.00412.82
4.3.100.0060.00312.82
4.3.90.0090.00312.82
4.3.80.0090.00012.82
4.3.70.0090.00012.82
4.3.60.0030.00612.82
4.3.50.0070.00512.82
4.3.40.0090.00212.82
4.3.30.0040.00412.82
4.3.20.0090.00012.82
4.3.10.0020.00512.82
4.3.00.0000.00712.82

preferences:
91.35 ms | 403 KiB | 5 Q