3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 17.48; $number = intval(($number*10))/10; // x.0 if x.1,x.2,x.3 ; x.5 if x.4,x.5,x.6 ; x+1.0 if x.7,x.8,x.9 $whole = floor($number); //integer part $decimal = $number - $whole; // decimal part echo $decimal;

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.0100.00718.43
8.3.50.0100.00821.20
8.3.40.0100.00718.44
8.3.30.0030.01018.69
8.3.20.0030.00518.65
8.3.10.0050.00321.17
8.3.00.0030.00519.81
8.2.180.0130.00716.50
8.2.170.0120.00922.96
8.2.160.0100.00320.52
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.20
8.2.110.0050.00520.44
8.2.100.0040.00717.91
8.2.90.0000.00719.17
8.2.80.0000.00917.97
8.2.70.0090.00317.13
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0040.00418.28
8.2.30.0070.00021.27
8.2.20.0050.00217.77
8.2.10.0050.00317.78
8.2.00.0000.01017.79
8.1.280.0060.00925.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0120.00622.54
8.1.230.0080.00421.10
8.1.220.0050.00318.77
8.1.210.0080.00018.88
8.1.200.0030.00617.35
8.1.190.0000.00717.51
8.1.180.0000.00818.10
8.1.170.0050.00320.44
8.1.160.0040.00418.75
8.1.150.0000.00818.74
8.1.140.0000.00717.50
8.1.130.0030.00317.73
8.1.120.0030.00417.36
8.1.110.0040.00717.34
8.1.100.0050.00317.50
8.1.90.0040.00417.49
8.1.80.0000.00717.39
8.1.70.0050.00317.55
8.1.60.0000.00817.57
8.1.50.0000.00817.37
8.1.40.0060.00317.55
8.1.30.0000.00817.65
8.1.20.0050.00317.69
8.1.10.0000.00817.49
8.1.00.0050.00317.48
8.0.300.0040.00420.06
8.0.290.0060.00317.18
8.0.280.0000.00718.46
8.0.270.0030.00317.24
8.0.260.0040.00416.87
8.0.250.0000.00717.01
8.0.240.0000.00916.95
8.0.230.0000.00816.98
8.0.220.0000.00716.88
8.0.210.0000.00817.00
8.0.200.0030.00316.82
8.0.190.0060.00316.93
8.0.180.0000.00716.91
8.0.170.0050.00216.87
8.0.160.0040.00416.93
8.0.150.0070.00016.73
8.0.140.0050.00316.87
8.0.130.0000.00513.31
8.0.120.0070.00016.85
8.0.110.0050.00316.79
8.0.100.0060.00316.86
8.0.90.0040.00416.92
8.0.80.0090.01016.82
8.0.70.0040.00416.95
8.0.60.0000.00716.90
8.0.50.0040.00416.82
8.0.30.0080.01316.99
8.0.20.0100.00817.40
8.0.10.0070.00016.93
8.0.00.0070.01216.88
7.4.330.0000.00616.85
7.4.320.0030.00316.53
7.4.300.0000.00616.56
7.4.290.0030.00316.54
7.4.280.0080.00016.63
7.4.270.0070.00016.58
7.4.260.0060.00013.30
7.4.250.0050.00316.42
7.4.240.0030.00316.63
7.4.230.0040.00416.55
7.4.220.0150.00616.40
7.4.210.0070.00816.61
7.4.200.0000.00716.73
7.4.190.0000.00816.71
7.4.160.0030.01216.29
7.4.150.0110.00717.40
7.4.140.0110.00717.86
7.4.130.0040.01216.45
7.4.120.0100.00716.62
7.4.110.0100.00616.61
7.4.100.0100.00716.29
7.4.90.0100.01316.52
7.4.80.0160.01019.39
7.4.70.0000.01616.66
7.4.60.0060.01216.71
7.4.50.0050.00516.45
7.4.40.0110.00022.77
7.4.30.0070.01016.62
7.4.00.0030.01415.05
7.3.330.0000.00513.19
7.3.320.0030.00313.20
7.3.310.0070.00016.27
7.3.300.0050.00216.30
7.3.290.0040.01116.48
7.3.280.0080.01116.31
7.3.270.0070.01117.40
7.3.260.0140.00718.24
7.3.250.0120.00616.64
7.3.240.0100.00716.41
7.3.230.0060.00916.64
7.3.210.0150.00616.27
7.3.200.0070.01019.39
7.3.190.0060.01016.40
7.3.180.0060.00916.33
7.3.170.0090.00616.27
7.3.160.0060.00916.53
7.3.120.0000.01615.01
7.3.110.0070.01114.78
7.3.100.0080.00814.65
7.3.90.0070.01114.70
7.3.80.0070.01014.98
7.3.70.0060.01214.48
7.3.60.0040.00714.86
7.3.50.0000.00814.75
7.3.40.0060.00614.83
7.3.30.0060.01214.79
7.3.20.0090.00916.77
7.3.10.0140.00016.37
7.3.00.0000.01416.55
7.2.330.0140.00316.49
7.2.320.0090.01516.64
7.2.310.0090.01216.59
7.2.300.0140.00316.56
7.2.290.0140.00616.39
7.2.240.0050.01315.07
7.2.230.0120.00615.17
7.2.220.0090.00915.11
7.2.210.0070.00714.83
7.2.200.0110.00414.68
7.2.190.0030.00714.68
7.2.180.0030.01214.92
7.2.170.0000.01814.66
7.2.160.0090.00615.04
7.2.150.0110.00416.66
7.2.140.0060.00616.50
7.2.130.0100.00316.57
7.2.120.0070.00716.81
7.2.110.0030.01016.73
7.2.100.0060.00616.45
7.2.90.0040.00716.84
7.2.80.0060.00816.58
7.2.70.0060.00916.88
7.2.60.0030.01116.83
7.2.50.0070.00716.66
7.2.40.0040.00716.91
7.2.30.0080.00316.83
7.2.20.0030.01016.64
7.2.10.0040.00816.75
7.2.00.0000.01416.67
7.1.330.0120.00315.74
7.1.320.0090.00615.77
7.1.310.0040.00815.85
7.1.300.0030.00515.52
7.1.290.0030.01015.57
7.1.280.0060.00915.80
7.1.270.0070.00715.83
7.1.260.0060.01215.91
7.1.250.0060.00315.98
7.1.200.0090.00615.69
7.1.70.0300.00715.19
7.1.60.0430.00315.38
7.1.50.4160.00715.20
7.1.40.0730.01015.04
7.1.30.0620.00715.04
7.1.20.0490.00715.04
7.1.10.0590.00315.04
7.1.00.0520.00915.04
7.0.200.0350.00615.04
7.0.190.0400.00815.04
7.0.180.0560.00615.04
7.0.170.0490.00015.04
7.0.160.0450.00615.04
7.0.150.0430.00715.04
7.0.140.0500.00515.04
7.0.130.0430.00715.04
7.0.120.0370.00915.04
7.0.110.0650.00315.04
7.0.100.0580.00015.04
7.0.90.4870.01315.04
7.0.80.0580.00015.04
7.0.70.0450.00715.04
7.0.60.0420.01315.04
7.0.50.0490.00615.04
7.0.40.0000.01315.04
7.0.30.0050.00815.04
7.0.20.0070.01415.04
7.0.10.0100.01015.04
7.0.00.0100.00615.04
5.6.300.0030.04920.82
5.6.290.0130.04320.77
5.6.280.0030.04920.96
5.6.270.0220.03821.06
5.6.260.0100.04120.85
5.6.250.0160.03620.95
5.6.240.0280.05020.85
5.6.230.0160.04520.95
5.6.220.0130.03820.81
5.6.210.0030.04921.04
5.6.200.0170.04021.02
5.6.190.0100.04720.78
5.6.180.0080.04520.90
5.6.170.0100.05120.92
5.6.160.0160.05620.97
5.6.150.0100.04121.01
5.6.140.0170.03820.82
5.6.130.0090.04920.91
5.6.120.0160.03721.01
5.6.110.0090.04920.79
5.6.100.0000.07320.91
5.6.90.0040.07020.78
5.6.80.0100.05120.33
5.6.70.0110.04620.32
5.6.60.0100.04520.14
5.6.50.0040.06520.21
5.6.40.0210.03320.16
5.6.30.0030.08720.38
5.6.20.0070.04020.16
5.6.10.0070.04520.39
5.6.00.0040.04720.38
5.5.380.0100.04317.46
5.5.370.0040.05317.46
5.5.360.0100.05017.60
5.5.350.0110.03517.45
5.5.340.0100.05218.06
5.5.330.0230.05317.95
5.5.320.0000.05017.95
5.5.310.0030.06318.08
5.5.300.0030.04317.88
5.5.290.0100.04217.74
5.5.280.0030.07817.93
5.5.270.0150.07417.95
5.5.260.0000.05318.07
5.5.250.0070.04417.65
5.5.240.0070.04017.22
5.5.230.0060.04017.31
5.5.220.0140.06517.44
5.5.210.0070.04017.36
5.5.200.0090.03617.46
5.5.190.0030.06717.29
5.5.180.0030.04817.38
5.5.160.0140.05117.29
5.5.150.0070.03817.33
5.5.140.0000.04617.46
5.5.130.0030.04117.46
5.5.120.0060.03817.37
5.5.110.0030.04917.40
5.5.100.0000.04517.33
5.5.90.0100.03817.25
5.5.80.0070.03717.28
5.5.70.0100.03417.26
5.5.60.0040.04617.31
5.5.50.0040.04217.18
5.5.40.0040.04017.07
5.5.30.0070.04517.27
5.5.20.0070.04017.27
5.5.10.0160.02617.23
5.5.00.0060.04516.96
5.4.450.0130.03519.36
5.4.440.0100.08119.40
5.4.430.0090.03719.46
5.4.420.0030.05819.36
5.4.410.0100.03519.21
5.4.400.0290.03218.89
5.4.390.0030.05919.06
5.4.380.0000.04518.88
5.4.370.0140.03118.84
5.4.360.0030.04019.14
5.4.350.0060.03818.86
5.4.340.0130.03918.92
5.4.320.0030.04318.92
5.4.310.0070.04319.02
5.4.300.0070.03619.06
5.4.290.0040.04318.91
5.4.280.0070.03719.16
5.4.270.0030.05019.00
5.4.260.0030.04119.18
5.4.250.0110.03919.06
5.4.240.0030.04119.10
5.4.230.0100.03318.85
5.4.220.0030.04218.90
5.4.210.0000.04719.01
5.4.200.0210.03919.06
5.4.190.0070.03519.04
5.4.180.0040.03918.83
5.4.170.0100.07318.89
5.4.160.0000.04518.98
5.4.150.0040.03918.81
5.4.140.0060.03716.40
5.4.130.0120.03116.60
5.4.120.0000.05416.57
5.4.110.0000.04216.58
5.4.100.0100.07116.64
5.4.90.0100.03316.58
5.4.80.0000.04516.50
5.4.70.0170.04516.54
5.4.60.0070.06916.55
5.4.50.0100.04816.34
5.4.40.0100.03516.61
5.4.30.0030.04116.46
5.4.20.0030.06716.58
5.4.10.0030.04016.32
5.4.00.0000.04916.00
5.3.290.0070.05015.04
5.3.280.0090.03315.04
5.3.270.0070.04015.04
5.3.260.0070.04015.04
5.3.250.0100.03415.04
5.3.240.0000.04215.04
5.3.230.0100.03315.04
5.3.220.0070.04015.04
5.3.210.0130.03215.04
5.3.200.0130.03015.04
5.3.190.0000.04215.04
5.3.180.0070.04315.04
5.3.170.0000.04215.04
5.3.160.0000.07315.04
5.3.150.0070.06115.04
5.3.140.0030.05315.04
5.3.130.0000.04215.04
5.3.120.0030.04415.04
5.3.110.0120.03415.04
5.3.100.0030.04215.04
5.3.90.0070.03515.04
5.3.80.0160.03915.04
5.3.70.0160.06015.04
5.3.60.0100.03615.04
5.3.50.0060.03815.04
5.3.40.0100.06115.04
5.3.30.0060.03615.04
5.3.20.0060.03615.04
5.3.10.0070.03915.04
5.3.00.0070.03315.04
5.2.170.0090.02415.04
5.2.160.0030.05415.04
5.2.150.0130.02715.04
5.2.140.0060.03515.04
5.2.130.0130.02315.04
5.2.120.0060.02915.04
5.2.110.0040.03015.04
5.2.100.0070.02815.04
5.2.90.0060.03115.04
5.2.80.0030.03515.04
5.2.70.0070.02615.04
5.2.60.0000.03515.04
5.2.50.0030.03215.04
5.2.40.0060.02815.04
5.2.30.0060.02815.04
5.2.20.0040.02915.04
5.2.10.0060.02615.04
5.2.00.0030.03115.04
5.1.60.0030.02415.04
5.1.50.0030.02515.04
5.1.40.0000.02815.04
5.1.30.0070.02315.04
5.1.20.0120.02115.04
5.1.10.0110.02115.04
5.1.00.0070.02415.04
5.0.50.0040.02115.04
5.0.40.0030.02715.04
5.0.30.0060.02715.04
5.0.20.0030.02115.04
5.0.10.0000.02315.04
5.0.00.0000.03515.04
4.4.90.0140.01715.04
4.4.80.0000.02415.04
4.4.70.0000.01815.04
4.4.60.0070.01015.04
4.4.50.0000.02215.04
4.4.40.0030.02415.04
4.4.30.0000.01815.04
4.4.20.0000.01915.04
4.4.10.0040.01815.04
4.4.00.0100.01615.04
4.3.110.0060.01515.04
4.3.100.0000.01715.04
4.3.90.0100.00815.04
4.3.80.0000.02815.04
4.3.70.0000.01815.04
4.3.60.0030.01415.04
4.3.50.0040.01415.04
4.3.40.0100.03015.04
4.3.30.0000.01915.04
4.3.20.0040.01515.04
4.3.10.0000.01815.04
4.3.00.0070.01115.04

preferences:
44.05 ms | 401 KiB | 5 Q