3v4l.org

run code in 300+ PHP versions simultaneously
<?php $float = 500.10; var_dump(gettype($float), $float, gettype($float) == 'float', (float) $float, // Cast to float (int) $float); // Cast to integer $float = (float) 500.10; // Can only be decimal numbers. var_dump(gettype($float), $float, gettype($float) == 'float', (float) $float, // Cast to float (int) $float); // Cast to integer

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.0080.00618.56
8.3.50.0090.00717.61
8.3.40.0090.00618.71
8.3.30.0040.01118.72
8.3.20.0000.01418.79
8.3.10.0120.00420.58
8.3.00.0080.00017.38
8.2.180.0040.01116.38
8.2.170.0110.00422.96
8.2.160.0120.00319.20
8.2.150.0090.00024.18
8.2.140.0000.00724.66
8.2.130.0090.00026.16
8.2.120.0040.00419.77
8.2.110.0070.00320.94
8.2.100.0080.00418.17
8.2.90.0040.00419.30
8.2.80.0080.00017.97
8.2.70.0040.00417.93
8.2.60.0040.00417.80
8.2.50.0030.00518.10
8.2.40.0070.00020.55
8.2.30.0040.00417.91
8.2.20.0040.00417.53
8.2.10.0070.00017.74
8.2.00.0000.00717.91
8.1.280.0170.00325.92
8.1.270.0050.00324.66
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0080.00024.02
8.1.230.0070.00419.22
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0090.00017.53
8.1.180.0000.00818.10
8.1.170.0030.00618.46
8.1.160.0000.00722.14
8.1.150.0040.00418.59
8.1.140.0060.00317.45
8.1.130.0080.00017.82
8.1.120.0070.00017.52
8.1.110.0040.00417.51
8.1.100.0050.00317.50
8.1.90.0000.00717.42
8.1.80.0030.00317.40
8.1.70.0030.00317.45
8.1.60.0040.00417.50
8.1.50.0050.00517.30
8.1.40.0000.00817.50
8.1.30.0040.00417.62
8.1.20.0030.00517.61
8.1.10.0040.00417.32
8.1.00.0000.00717.30
8.0.300.0080.00021.64
8.0.290.0040.00416.75
8.0.280.0040.00418.42
8.0.270.0050.00217.20
8.0.260.0030.00316.81
8.0.250.0040.00416.86
8.0.240.0040.00416.97
8.0.230.0000.00816.97
8.0.220.0000.00616.89
8.0.210.0070.00016.82
8.0.200.0060.00016.92
8.0.190.0000.00716.95
8.0.180.0000.00716.91
8.0.170.0040.00416.80
8.0.160.0050.00316.91
8.0.150.0040.00416.79
8.0.140.0020.00516.76
8.0.130.0030.00313.32
8.0.120.0000.00716.91
8.0.110.0070.00016.78
8.0.100.0070.00016.82
8.0.90.0050.00216.96
8.0.80.0100.00716.94
8.0.70.0040.00416.78
8.0.60.0000.00816.95
8.0.50.0070.00016.74
8.0.30.0100.00817.19
8.0.20.0120.00617.08
8.0.10.0000.00717.06
8.0.00.0140.00416.71
7.4.330.0020.00214.83
7.4.320.0060.00016.49
7.4.300.0060.00016.59
7.4.290.0050.00316.39
7.4.280.0080.00316.41
7.4.270.0030.00316.54
7.4.260.0000.00713.27
7.4.250.0030.00516.54
7.4.240.0000.00716.45
7.4.230.0070.00016.39
7.4.220.0070.01016.55
7.4.210.0070.01016.62
7.4.200.0040.00416.52
7.4.190.0030.00316.76
7.4.160.0160.00016.41
7.4.150.0090.00917.07
7.4.140.0170.00717.11
7.4.130.0080.01116.44
7.4.120.0090.01016.39
7.4.110.0090.00916.43
7.4.100.0070.01016.56
7.4.90.0120.00916.75
7.4.80.0030.01518.80
7.4.70.0030.01616.54
7.4.60.0190.00316.41
7.4.50.0030.00623.42
7.4.40.0040.01221.69
7.4.30.0120.00916.57
7.4.00.0100.00715.09
7.3.330.0030.00313.15
7.3.320.0080.00013.16
7.3.310.0030.00316.36
7.3.300.0030.00316.34
7.3.290.0090.00616.38
7.3.280.0130.00516.29
7.3.270.0000.01717.07
7.3.260.0070.01018.24
7.3.250.0130.00716.24
7.3.240.0130.00316.39
7.3.230.0140.00416.37
7.3.210.0100.00716.24
7.3.200.0070.01319.39
7.3.190.0000.01816.27
7.3.180.0140.00716.24
7.3.170.0030.01316.44
7.3.160.0090.00616.41
7.3.120.0030.01014.57
7.3.10.0040.00916.25
7.3.00.0110.00416.41
7.2.330.0040.01316.39
7.2.320.0110.00616.62
7.2.310.0060.01316.52
7.2.300.0150.00716.52
7.2.290.0140.00316.63
7.2.130.0060.00916.54
7.2.120.0150.00417.02
7.2.110.0030.00616.67
7.2.100.0080.00316.66
7.2.90.0090.00316.57
7.2.80.0030.01016.84
7.2.70.0070.00716.66
7.2.60.0070.00716.55
7.2.50.0130.00616.69
7.2.40.0140.00716.64
7.2.30.0060.01016.38
7.2.20.0090.00616.79
7.2.10.0040.01116.79
7.2.00.0050.00818.11
7.1.250.0120.00615.57
7.1.100.0030.01018.15
7.1.70.0000.00716.86
7.1.60.0070.01019.40
7.1.50.0090.01216.71
7.1.00.0100.07322.35
7.0.200.0070.00016.87
7.0.140.0070.07322.00
7.0.120.0000.03722.16
7.0.60.0070.08020.00
7.0.50.0100.07317.79
7.0.40.0170.04720.40
7.0.30.0170.05320.30
7.0.20.0300.07720.16
7.0.10.0230.04020.31
7.0.00.0000.04320.19
5.6.280.0030.07021.12
5.6.210.0200.07020.50
5.6.200.0100.07718.23
5.6.190.0030.04320.39
5.6.180.0230.08020.64
5.6.170.0230.04020.46
5.6.160.0000.04320.33
5.6.150.0030.04018.17
5.6.140.0000.04318.20
5.6.130.0070.06318.21
5.6.120.0070.06321.01
5.6.110.0230.07320.96
5.6.100.0100.07721.02
5.6.90.0100.05320.85
5.6.80.0030.06720.37
5.6.70.2600.02720.49
5.5.350.0270.06320.39
5.5.340.0030.05317.96
5.5.330.0100.08020.12
5.5.320.0170.07720.19
5.5.310.0300.05020.29
5.5.300.0030.08317.94
5.5.290.0070.08018.02
5.5.280.0070.03720.71
5.5.270.0170.07320.68
5.5.260.0070.08020.85
5.5.250.0100.08020.58
5.5.240.0030.04320.03
5.4.450.3400.04019.42
5.4.440.3330.04319.45
5.4.430.3530.04319.25
5.4.420.3470.04319.24
5.4.410.3500.04019.26
5.4.400.3330.04018.81
5.4.390.3900.04018.80
5.4.380.3330.03319.09
5.4.370.3300.04018.81
5.4.360.3800.05018.82
5.4.350.3230.03719.28
5.4.340.3570.03719.08
5.4.320.3400.04019.14
5.4.310.3600.03719.05
5.4.300.3330.05019.25
5.4.290.4330.03319.25
5.4.280.3500.04319.13
5.4.270.3200.04019.13
5.4.260.3570.03319.21
5.4.250.3400.04019.11
5.4.240.3370.04018.87
5.4.230.3530.04019.24
5.4.220.3800.04719.13
5.4.210.3500.03319.16
5.4.200.3470.03718.95
5.4.190.3700.02719.23
5.4.180.3400.04719.08
5.4.170.3300.03318.81
5.4.160.3330.03319.11
5.4.150.3530.02719.20
5.4.140.3570.03316.27
5.4.130.3470.03016.29
5.4.120.3430.04016.28
5.4.110.3570.03716.34
5.4.100.3670.04016.39
5.4.90.4170.04016.23
5.4.80.3530.03016.18
5.4.70.3500.03716.21
5.4.60.3530.04016.50
5.4.50.3600.04016.36
5.4.40.3500.04016.40
5.4.30.3300.03716.03
5.4.20.3600.04016.39
5.4.10.3570.03316.31
5.4.00.0030.03315.78
5.3.290.3470.04014.49
5.3.280.3930.02714.54
5.3.270.3470.04314.51
5.3.260.3530.03314.46
5.3.250.3500.03714.51
5.3.240.3600.03314.43
5.3.230.3400.03714.53
5.3.220.3700.03714.42
5.3.210.3530.04014.52
5.3.200.3500.04014.51
5.3.190.3570.04014.41
5.3.180.3630.04014.41
5.3.170.3570.03714.41
5.3.160.3800.03714.41
5.3.150.3270.04014.41
5.3.140.3800.04714.44
5.3.130.3330.03714.36
5.3.120.3730.04014.39
5.3.110.3670.04314.57
5.3.100.0030.04313.97
5.3.90.0070.03013.86
5.3.80.2070.04313.86
5.3.70.3730.03714.00
5.3.60.3370.03713.96
5.3.50.3470.03313.92
5.3.40.3500.03013.82
5.3.30.3400.04014.00
5.3.20.3370.03013.67
5.3.10.3770.04713.59
5.3.00.3570.03713.73
5.2.170.2570.03011.08
5.2.160.2830.03011.15
5.2.150.2870.03011.03
5.2.140.2830.02711.00
5.2.130.3230.03711.25
5.2.120.3230.02711.20
5.2.110.3070.02711.11
5.2.100.2730.02710.94
5.2.90.2970.03310.96
5.2.80.2600.03311.18
5.2.70.2830.03011.00
5.2.60.3030.03010.89
5.2.50.2800.03011.06
5.2.40.1100.02711.03
5.2.30.0070.06011.02
5.2.20.0070.05011.02
5.2.10.0000.06310.76
5.2.00.2300.03310.83
5.1.60.2800.0209.96
5.1.50.2930.0209.96
5.1.40.2600.02710.06
5.1.30.3030.02010.27
5.1.20.2930.02710.33
5.1.10.2670.02710.24
5.1.00.2700.0279.93
5.0.50.1700.0178.51
5.0.40.1070.0208.33
5.0.30.1200.0278.26
5.0.20.1400.0208.14
5.0.10.1470.0208.39
5.0.00.1330.0308.11
4.4.90.1270.0176.59
4.4.80.1430.0176.59
4.4.70.0070.0306.59
4.4.60.0000.0206.59
4.4.50.0000.0376.59
4.4.40.1630.0236.59
4.4.30.1670.0136.59
4.4.20.1600.0106.59
4.4.10.1370.0136.59
4.4.00.1170.0236.59
4.3.110.1100.0136.59
4.3.100.1270.0176.59
4.3.90.1530.0176.59
4.3.80.1330.0276.59
4.3.70.1400.0136.59
4.3.60.1630.0176.59
4.3.50.1570.0106.59
4.3.40.1600.0236.59
4.3.30.0670.0176.59
4.3.20.0800.0236.59
4.3.10.0630.0176.59
4.3.00.0500.0136.59

preferences:
42.95 ms | 401 KiB | 5 Q