3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0.6/0.1; printf( "%1.36f\n", $a); $b = $a % 5; print "\$a=$a; \$b=$b\n"; # result: # $a=6; $b=0 # One should expect $b = 1 $a = 0.6/0.1; $a = round($a); printf( "%1.36f\n", $a); $b = $a % 5; print "\$a=$a; \$b=$b\n"; var_dump( (int) 5.999999999999999111821580299874767661, (int) 6.000000000000000000000000000000000000);

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.0070.00716.50
8.3.50.0140.00617.28
8.3.40.0110.00418.84
8.3.30.0030.01218.84
8.3.20.0030.00518.74
8.3.10.0030.00618.85
8.3.00.0030.00519.50
8.2.180.0090.00618.54
8.2.170.0090.00922.96
8.2.160.0070.00721.07
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00318.97
8.2.110.0070.00319.33
8.2.100.0110.00017.91
8.2.90.0040.00419.00
8.2.80.0030.00617.97
8.2.70.0000.00817.50
8.2.60.0060.00617.74
8.2.50.0000.01118.07
8.2.40.0000.00818.34
8.2.30.0040.00418.17
8.2.20.0060.00317.77
8.2.10.0000.00717.90
8.2.00.0070.00417.75
8.1.280.0110.00425.92
8.1.270.0000.00824.66
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0000.00922.27
8.1.230.0110.00020.73
8.1.220.0050.00317.80
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0000.00917.41
8.1.180.0040.00418.96
8.1.170.0040.00418.64
8.1.160.0040.00422.22
8.1.150.0000.00718.68
8.1.140.0040.00417.45
8.1.130.0030.00317.95
8.1.120.0030.00617.48
8.1.110.0000.00817.36
8.1.100.0000.00717.51
8.1.90.0030.00317.42
8.1.80.0000.00717.53
8.1.70.0000.00717.38
8.1.60.0040.00417.54
8.1.50.0040.00417.44
8.1.40.0080.00017.57
8.1.30.0040.00417.65
8.1.20.0040.00417.67
8.1.10.0040.00417.52
8.1.00.0080.00017.54
8.0.300.0000.00718.77
8.0.290.0070.00016.88
8.0.280.0030.00318.51
8.0.270.0040.00416.94
8.0.260.0000.00616.95
8.0.250.0040.00417.06
8.0.240.0000.00717.09
8.0.230.0000.00716.96
8.0.220.0000.00917.09
8.0.210.0020.00516.93
8.0.200.0030.00317.02
8.0.190.0070.00016.96
8.0.180.0000.00817.06
8.0.170.0000.00917.04
8.0.160.0030.00317.11
8.0.150.0030.00616.94
8.0.140.0030.00617.00
8.0.130.0060.00013.52
8.0.120.0050.00316.96
8.0.110.0040.00417.07
8.0.100.0000.00717.04
8.0.90.0000.00716.86
8.0.80.0130.01016.98
8.0.70.0040.00417.01
8.0.60.0020.00516.84
8.0.50.0040.00416.89
8.0.30.0160.01116.94
8.0.20.0150.01017.20
8.0.10.0000.00817.03
8.0.00.0110.00616.86
7.4.330.0000.00513.00
7.4.320.0030.00316.54
7.4.300.0040.00416.66
7.4.290.0040.00416.49
7.4.280.0000.00816.52
7.4.270.0000.00816.66
7.4.260.0030.00313.23
7.4.250.0090.00016.57
7.4.240.0030.00516.57
7.4.230.0000.00616.65
7.4.220.0130.01116.62
7.4.210.0070.00916.62
7.4.200.0070.00016.53
7.4.190.0000.00716.62
7.4.160.0040.01216.49
7.4.150.0120.00616.61
7.4.140.0120.00816.43
7.4.130.0090.00916.44
7.4.120.0120.00616.66
7.4.110.0130.00316.66
7.4.100.0070.01016.65
7.4.90.0190.00316.66
7.4.80.0090.01419.39
7.4.70.0090.01616.70
7.4.60.0130.00716.50
7.4.50.0060.00616.70
7.4.40.0110.00716.44
7.4.30.0100.00716.54
7.4.00.0070.01014.83
7.3.330.0040.00413.33
7.3.320.0050.00013.39
7.3.310.0000.00716.20
7.3.300.0040.00416.44
7.3.290.0160.00616.36
7.3.280.0130.00716.43
7.3.270.0120.00616.34
7.3.260.0080.01116.59
7.3.250.0110.00616.51
7.3.240.0130.01016.39
7.3.230.0060.01216.60
7.3.210.0100.00616.55
7.3.200.0060.00916.42
7.3.190.0070.01416.41
7.3.180.0110.00516.49
7.3.170.0070.01016.38
7.3.160.0120.00316.46
7.3.120.0060.00614.79
7.3.110.0110.00714.63
7.3.100.0070.01014.72
7.3.90.0030.01214.66
7.3.80.0100.00514.73
7.3.70.0070.00714.68
7.3.60.0060.00814.76
7.3.50.0070.00914.67
7.3.40.0100.00314.84
7.3.30.0080.00414.70
7.3.20.0020.01116.58
7.3.10.0070.00816.43
7.3.00.0070.00816.48
7.2.330.0060.01516.72
7.2.320.0120.00616.71
7.2.310.0110.01116.71
7.2.300.0030.01316.44
7.2.290.0170.00316.49
7.2.250.0110.00714.80
7.2.240.0100.01014.90
7.2.230.0080.00614.72
7.2.220.0070.01115.10
7.2.210.0060.01014.98
7.2.200.0050.00914.92
7.2.190.0070.00814.69
7.2.180.0020.01314.89
7.2.170.0050.01114.88
7.2.130.0040.00716.78
7.2.120.0070.01116.49
7.2.110.0070.01016.80
7.2.100.0120.00316.45
7.2.90.0130.00316.58
7.2.80.0040.00916.93
7.2.70.0070.00816.61
7.2.60.0180.00016.63
7.2.50.0060.00316.94
7.2.40.0100.00716.68
7.2.30.0030.00716.75
7.2.20.0090.00916.88
7.2.10.0070.00716.77
7.2.00.0050.00718.22
7.1.330.0080.00715.73
7.1.320.0030.01115.74
7.1.310.0030.01115.80
7.1.300.0050.00715.71
7.1.290.0030.01215.68
7.1.280.0040.00915.60
7.1.270.0050.00515.66
7.1.260.0070.00915.79
7.1.250.0070.00715.51
7.1.100.0030.01017.98
7.1.70.0050.00217.28
7.1.60.0070.01719.40
7.1.50.0040.01817.00
7.1.00.0030.03322.31
7.0.200.0190.00614.79
7.0.140.0070.07322.13
7.0.120.0100.06022.23
7.0.60.0070.08019.96
7.0.50.0000.05717.83
7.0.40.0030.08720.23
7.0.30.0270.07320.01
7.0.20.0230.04720.00
7.0.10.0170.05320.20
7.0.00.0100.08020.13
5.6.210.0030.06020.52
5.6.200.0130.08018.18
5.6.190.0030.08720.61
5.6.180.0270.06720.42
5.6.170.0200.04320.71
5.6.160.0130.07720.55
5.6.150.0000.07718.12
5.6.140.0030.04718.18
5.6.130.0170.07718.07
5.6.120.0070.04020.98
5.6.110.0030.08720.98
5.6.100.0030.05721.01
5.6.90.0030.07320.95
5.6.80.0100.08020.42
5.5.350.0270.07020.34
5.5.340.0100.08017.88
5.5.330.0070.05020.57
5.5.320.0170.04320.44
5.5.310.0270.06020.38
5.5.300.0100.04317.87
5.5.290.0100.06717.96
5.5.280.0030.08720.76
5.5.270.0070.08320.79
5.5.260.0070.04020.83
5.5.250.0100.08020.68
5.5.240.0130.07320.25
5.4.450.0070.06719.51
5.4.440.0070.08319.25
5.4.430.0200.06719.50
5.4.420.0000.08319.50
5.4.410.0070.08319.26
5.4.400.0070.07319.07
5.4.390.0070.07719.09
5.4.380.0070.04719.14
5.4.370.0100.04018.79
5.4.360.0070.04319.22
5.4.350.0030.05318.92
5.4.340.0070.08019.18
5.4.320.0070.08018.79
5.4.310.0070.08018.79
5.4.300.0070.04319.14
5.4.290.0070.06719.06
5.4.280.0100.07719.17
5.4.270.0100.07019.17
5.4.260.0130.07019.13
5.4.250.0030.06719.07
5.4.240.0070.06019.07
5.4.230.0070.04719.18
5.4.220.0100.07319.02
5.4.210.0030.04019.17
5.4.200.0070.06319.17
5.4.190.0070.06719.13
5.4.180.0070.05719.17
5.4.170.0070.06719.13
5.4.160.0070.07718.76
5.4.150.0000.09019.16
5.4.140.0130.07016.32
5.4.130.0070.05316.33
5.4.120.0000.06316.40
5.4.110.0130.05716.41
5.4.100.0000.04016.39
5.4.90.0130.06316.38
5.4.80.0000.06016.37
5.4.70.0070.03716.18
5.4.60.0000.04016.34
5.4.50.0100.03016.21
5.4.40.0030.04716.36
5.4.30.0100.05316.30
5.4.20.0100.05716.12
5.4.10.0000.07316.32
5.4.00.0070.07015.76
5.3.290.0030.08014.59
5.3.280.0070.07314.44
5.3.270.0030.08014.56
5.3.260.0100.06314.53
5.3.250.0100.07314.45
5.3.240.0070.06714.53
5.3.230.0030.04314.62
5.3.220.0070.04014.50
5.3.210.0070.07714.58
5.3.200.0030.05714.49
5.3.190.0070.06014.51
5.3.180.0070.05014.50
5.3.170.0030.04014.49
5.3.160.0070.05314.58
5.3.150.0000.04714.54
5.3.140.0000.05314.66
5.3.130.0100.06714.49
5.3.120.0130.04314.48
5.3.110.0170.05714.48
5.3.100.0130.06013.98
5.3.90.0130.07014.00
5.3.80.0070.03713.95
5.3.70.0100.03013.95
5.3.60.0170.06713.95
5.3.50.0030.07013.89
5.3.40.0000.04713.89
5.3.30.0030.05013.83
5.3.20.0100.07013.62
5.3.10.0130.04313.63
5.3.00.0000.06713.58
5.2.170.0070.04711.25
5.2.160.0000.06711.21
5.2.150.0030.06011.13
5.2.140.0030.03711.20
5.2.130.0030.05311.26
5.2.120.0030.05311.32
5.2.110.0100.04011.30
5.2.100.0030.06011.05
5.2.90.0030.05011.23
5.2.80.0100.05711.04
5.2.70.0100.04311.38
5.2.60.0000.03011.11
5.2.50.0030.02711.08
5.2.40.0000.03011.07
5.2.30.0030.02711.13
5.2.20.0030.03011.15
5.2.10.0030.02710.97
5.2.00.0000.03010.83
5.1.60.0030.02310.15
5.1.50.0000.03010.25
5.1.40.0000.02710.15
5.1.30.0030.02310.60
5.1.20.0000.03310.46
5.1.10.0070.02710.19
5.1.00.0000.02710.30
5.0.50.0000.0238.66
5.0.40.0030.0208.66
5.0.30.0000.0308.48
5.0.20.0000.0208.46
5.0.10.0000.0208.20
5.0.00.0030.0278.19
4.4.90.0070.0277.90
4.4.80.0000.0177.90
4.4.70.0030.0137.90
4.4.60.0000.0177.90
4.4.50.0070.0107.90
4.4.40.0000.0237.90
4.4.30.0030.0137.90
4.4.20.0030.0137.90
4.4.10.0030.0207.90
4.4.00.0000.0277.90
4.3.110.0000.0177.90
4.3.100.0070.0107.90
4.3.90.0000.0137.90
4.3.80.0030.0237.90
4.3.70.0030.0107.90
4.3.60.0000.0177.90
4.3.50.0000.0177.90
4.3.40.0030.0277.90
4.3.30.0000.0177.90
4.3.20.0000.0177.90
4.3.10.0000.0177.90
4.3.00.0000.0177.90

preferences:
39.8 ms | 400 KiB | 5 Q