3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rate1 = 0.02; $var = sprintf("%.2f",1260); //$var holds numeric string var_dump($var,"\n\n"); $var = 1260; $product = $var * $rate1; var_dump("product:", $product,"\n"); // two ways to format $product echo number_format( $product, 2),"\n"; echo printf("%f",round($product,2));

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.0140.00716.50
8.3.50.0100.01016.37
8.3.40.0070.00718.79
8.3.30.0140.00018.84
8.3.20.0070.00720.19
8.3.10.0070.00022.02
8.3.00.0000.00819.66
8.2.180.0070.00716.75
8.2.170.0070.00722.96
8.2.160.0070.00720.57
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.18
8.2.120.0070.00726.35
8.2.110.0030.00620.70
8.2.100.0110.00018.16
8.2.90.0030.00519.21
8.2.80.0040.00417.97
8.2.70.0030.00517.50
8.2.60.0040.00417.93
8.2.50.0030.00618.16
8.2.40.0000.00720.58
8.2.30.0040.00419.38
8.2.20.0000.00718.13
8.2.10.0030.00518.19
8.2.00.0000.00718.14
8.1.280.0100.01025.92
8.1.270.0040.00423.96
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0030.00619.27
8.1.230.0080.00322.25
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0030.00717.13
8.1.190.0060.00317.35
8.1.180.0030.00618.10
8.1.170.0050.00318.48
8.1.160.0000.00719.05
8.1.150.0040.00420.68
8.1.140.0040.00419.59
8.1.130.0030.00518.77
8.1.120.0030.00317.50
8.1.110.0040.00417.39
8.1.100.0040.00417.46
8.1.90.0030.00617.35
8.1.80.0000.00817.47
8.1.70.0030.00517.45
8.1.60.0080.00017.64
8.1.50.0080.00017.53
8.1.40.0000.00817.50
8.1.30.0000.00817.65
8.1.20.0040.00417.66
8.1.10.0020.00517.50
8.1.00.0000.00717.51
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0040.00418.43
8.0.270.0030.00317.23
8.0.260.0030.00316.90
8.0.250.0080.00016.93
8.0.240.0040.00416.96
8.0.230.0080.00017.00
8.0.220.0000.00816.84
8.0.210.0000.00716.77
8.0.200.0000.00616.84
8.0.190.0030.00516.96
8.0.180.0050.00316.88
8.0.170.0030.00516.95
8.0.160.0030.00316.96
8.0.150.0040.00416.80
8.0.140.0030.00316.73
8.0.130.0000.00613.33
8.0.120.0040.00416.87
8.0.110.0040.00416.80
8.0.100.0000.00816.68
8.0.90.0000.00716.77
8.0.80.0100.01116.89
8.0.70.0000.00716.79
8.0.60.0000.00717.01
8.0.50.0040.00416.80
8.0.30.0150.00317.03
8.0.20.0110.00817.40
8.0.10.0040.00417.03
8.0.00.0030.01516.68
7.4.330.0020.00215.55
7.4.320.0000.00616.59
7.4.300.0000.00716.58
7.4.290.0050.00216.60
7.4.280.0000.00716.45
7.4.270.0070.00016.57
7.4.260.0060.00013.35
7.4.250.0050.00216.51
7.4.240.0050.00216.54
7.4.230.0070.00016.66
7.4.220.0160.00916.46
7.4.210.0090.00916.59
7.4.200.0040.00416.26
7.4.160.0120.00516.42
7.4.150.0040.01417.40
7.4.140.0110.01117.86
7.4.130.0150.00316.50
7.4.120.0130.00916.48
7.4.110.0100.00716.64
7.4.100.0100.00716.44
7.4.90.0090.01216.45
7.4.80.0110.00719.39
7.4.70.0100.00716.64
7.4.60.0100.00616.51
7.4.50.0070.00516.55
7.4.40.0030.01316.48
7.4.30.0070.01016.38
7.4.00.0060.00914.98
7.3.330.0050.00013.17
7.3.320.0000.00513.01
7.3.310.0030.00316.26
7.3.300.0000.00616.21
7.3.290.0030.00316.13
7.3.280.0080.00816.26
7.3.270.0060.01117.40
7.3.260.0120.01616.61
7.3.250.0090.00916.50
7.3.240.0110.00616.65
7.3.230.0030.01416.25
7.3.210.0090.00816.64
7.3.200.0080.00816.24
7.3.190.0060.00916.61
7.3.180.0130.00316.32
7.3.170.0100.01316.49
7.3.160.0120.00416.51
7.2.330.0090.00916.68
7.2.320.0060.01116.60
7.2.310.0190.00316.67
7.2.300.0040.01416.75
7.2.290.0100.00616.54
7.2.60.0100.00316.79
7.2.00.0000.01519.53
7.1.200.0100.00315.64
7.1.100.0180.00717.71
7.1.70.0060.00617.15
7.1.60.0130.01334.99
7.1.50.0140.01134.91
7.1.40.0200.00734.41
7.1.30.0140.01034.48
7.1.20.0160.00934.39
7.1.10.0060.00616.57
7.1.00.0060.00616.36
7.0.200.0060.00616.52
7.0.190.0040.00716.41
7.0.180.0060.00916.45
7.0.170.0090.00316.19
7.0.160.0060.00616.05
7.0.150.0000.01316.16
7.0.140.0060.00616.34
7.0.130.0070.00416.38
7.0.120.0030.00916.68
7.0.110.0080.00416.34
7.0.100.0000.01116.00
7.0.90.0060.00616.27
7.0.80.0000.01216.23
7.0.70.0090.00316.29
7.0.60.0060.00616.07
7.0.50.0080.00416.29
7.0.40.0120.00016.55
7.0.30.0030.00916.24
7.0.20.0090.00316.42
7.0.10.0030.00916.54
7.0.00.0000.01216.30

preferences:
38.37 ms | 401 KiB | 5 Q