3v4l.org

run code in 300+ PHP versions simultaneously
<?php $amount = 'M=$1.5'; $amt = $amount * (substr($amt , 0, (strlen($amt)-1) ) / 100); $amt = round($amt, 2, PHP_ROUND_HALF_UP); echo (float)$amt;

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.0090.01218.05
8.3.40.0070.01618.87
8.3.30.0140.00018.49
8.3.20.0070.00020.20
8.3.10.0040.00421.73
8.3.00.0150.00019.79
8.2.180.0080.00818.54
8.2.170.0120.00422.96
8.2.160.0090.00920.41
8.2.150.0070.00724.18
8.2.140.0050.00324.66
8.2.130.0060.00320.70
8.2.120.0110.00426.35
8.2.110.0000.00920.23
8.2.100.0030.00717.91
8.2.90.0080.00019.08
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0040.00417.68
8.2.50.0090.00018.07
8.2.40.0090.00021.14
8.2.30.0040.00420.62
8.2.20.0030.00617.82
8.2.10.0070.00018.12
8.2.00.0050.00318.15
8.1.280.0070.00725.92
8.1.270.0030.00520.24
8.1.260.0070.01028.09
8.1.250.0040.00428.09
8.1.240.0080.00021.99
8.1.230.0030.00920.91
8.1.220.0000.00917.74
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00817.63
8.1.180.0050.00318.10
8.1.170.0000.00818.53
8.1.160.0030.00620.77
8.1.150.0080.00018.82
8.1.140.0030.00519.47
8.1.130.0030.00317.67
8.1.120.0040.00417.43
8.1.110.0030.00517.36
8.1.100.0040.00417.43
8.1.90.0040.00417.28
8.1.80.0030.00617.45
8.1.70.0000.00817.29
8.1.60.0000.00717.46
8.1.50.0080.00017.44
8.1.40.0060.00317.52
8.1.30.0030.00517.55
8.1.20.0050.00317.66
8.1.10.0000.00717.50
8.1.00.0000.00817.55
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.43
8.0.270.0000.00717.16
8.0.260.0040.00417.13
8.0.250.0000.00717.04
8.0.240.0000.00816.96
8.0.230.0030.00316.92
8.0.220.0040.00416.91
8.0.210.0040.00416.84
8.0.200.0000.00616.94
8.0.190.0070.00016.88
8.0.180.0000.00816.92
8.0.170.0040.00416.90
8.0.160.0070.00016.78
8.0.150.0070.00016.79
8.0.140.0030.00616.75
8.0.130.0000.00513.27
8.0.120.0000.00716.80
8.0.110.0040.00316.74
8.0.100.0050.00516.80
8.0.90.0040.00416.69
8.0.80.0060.00916.82
8.0.70.0070.00016.95
8.0.60.0080.00016.77
8.0.50.0000.00717.00
8.0.30.0130.00716.93
8.0.20.0100.00917.40
8.0.10.0000.00817.07
8.0.00.0070.01116.79
7.4.330.0000.00516.77
7.4.320.0080.00016.60
7.4.300.0000.00616.60
7.4.290.0040.00416.61
7.4.280.0000.00716.49
7.4.270.0040.00416.39
7.4.260.0030.00316.55
7.4.250.0050.00316.43
7.4.240.0000.00716.48
7.4.230.0070.00016.34
7.4.220.0170.01016.43
7.4.210.0060.00916.55
7.4.200.0050.00316.38
7.4.160.0160.00316.84
7.4.150.0080.00817.40
7.4.140.0130.00817.86
7.4.130.0120.00716.41
7.4.120.0100.00716.42
7.4.110.0090.00916.31
7.4.100.0070.01116.59
7.4.90.0130.00316.79
7.4.80.0220.00019.39
7.4.70.0140.00416.73
7.4.60.0060.01316.38
7.4.50.0040.00716.43
7.4.40.0080.00916.72
7.4.30.0130.00316.38
7.4.10.0090.00915.12
7.4.00.0030.01214.94
7.3.330.0000.00513.18
7.3.320.0030.00313.25
7.3.310.0070.00016.21
7.3.300.0030.00316.37
7.3.290.0080.00716.36
7.3.280.0090.00916.38
7.3.270.0070.01417.40
7.3.260.0110.00716.30
7.3.250.0150.00916.39
7.3.240.0090.00916.38
7.3.230.0090.01216.39
7.3.210.0140.01116.43
7.3.200.0100.00616.50
7.3.190.0100.00616.41
7.3.180.0070.01016.47
7.3.170.0130.00316.39
7.3.160.0080.01116.48
7.3.130.0070.01014.83
7.3.120.0100.00714.85
7.3.110.0040.00814.89
7.3.100.0060.00914.83
7.3.90.0000.01714.54
7.3.80.0060.00715.10
7.3.70.0100.00314.68
7.3.60.0000.00814.56
7.3.50.0100.00314.86
7.3.40.0140.00014.70
7.3.30.0110.00714.80
7.3.20.0090.00616.50
7.3.10.0120.00316.83
7.3.00.0130.00316.66
7.2.330.0160.00616.73
7.2.320.0080.00916.31
7.2.310.0070.01016.45
7.2.300.0110.00616.52
7.2.290.0120.00616.62
7.2.260.0090.00914.75
7.2.250.0090.00914.75
7.2.240.0060.00614.86
7.2.230.0000.01915.15
7.2.220.0060.01314.61
7.2.210.0040.00815.17
7.2.200.0000.01214.71
7.2.190.0070.01015.03
7.2.180.0100.00614.88
7.2.170.0080.01214.90
7.2.160.0070.00714.96
7.2.150.0060.00916.82
7.2.140.0040.01217.02
7.2.130.0120.00016.77
7.2.120.0000.01317.04
7.2.110.0040.01216.97
7.2.100.0100.00316.86
7.2.90.0090.00916.48
7.2.80.0090.00916.49
7.2.70.0100.00716.88
7.2.60.0030.01116.78
7.2.50.0070.00416.98
7.2.40.0050.00517.00
7.2.30.0060.00617.00
7.2.20.0000.01516.89
7.2.10.0060.00916.78
7.2.00.0060.00917.98
7.1.330.0030.00915.72
7.1.320.0030.01415.56
7.1.310.0030.01215.73
7.1.300.0000.01115.63
7.1.290.0030.00615.71
7.1.280.0000.01715.79
7.1.270.0040.00715.77
7.1.260.0110.00315.56
7.1.250.0040.00715.43
7.1.240.0120.00315.92
7.1.230.0060.00315.87
7.1.220.0060.00615.83
7.1.210.0080.00415.85
7.1.200.0090.00615.35
7.1.190.0030.00915.76
7.1.180.0040.00815.65
7.1.170.0030.00915.98
7.1.160.0100.00315.93
7.1.150.0000.00915.76
7.1.140.0060.00615.77
7.1.130.0060.01015.69
7.1.120.0070.00715.91
7.1.110.0090.00616.09
7.1.100.0050.00816.80
7.1.90.0100.00315.68
7.1.80.0000.01515.75
7.1.70.0060.00716.47
7.1.60.0100.01017.36
7.1.50.0070.01316.35
7.1.40.0080.00415.83
7.1.30.0040.00815.75
7.1.20.0040.00415.47
7.1.10.0030.00915.95
7.1.00.0070.04219.11
7.0.330.0090.00615.50
7.0.320.0110.00315.35
7.0.310.0070.00715.35
7.0.300.0080.00415.44
7.0.290.0040.01115.61
7.0.280.0070.00315.52
7.0.270.0030.00715.41
7.0.260.0060.00615.43
7.0.250.0060.00615.40
7.0.240.0000.01415.61
7.0.230.0070.01015.63
7.0.220.0030.01215.44
7.0.210.0040.01115.08
7.0.200.0050.00516.06
7.0.190.0090.00615.53
7.0.180.0000.01515.28
7.0.170.0110.00315.31
7.0.160.0100.00315.53
7.0.150.0030.01015.30
7.0.140.0070.00715.34
7.0.130.0070.00715.58
7.0.120.0070.00715.20
7.0.110.0100.00315.51
7.0.100.0000.01515.58
7.0.90.0000.00915.33
7.0.80.0030.00915.18
7.0.70.0060.00315.70
7.0.60.0040.04717.65
7.0.50.0090.04216.64
7.0.40.0130.03816.86
7.0.30.0170.02816.80
7.0.20.0120.02316.75
7.0.10.0100.04516.80
7.0.00.0050.02616.84
5.6.400.0040.00714.34
5.6.390.0060.00914.36
5.6.380.0070.00314.13
5.6.370.0060.00914.52
5.6.360.0030.00914.33
5.6.350.0070.00714.17
5.6.340.0030.01014.28
5.6.330.0080.00314.03
5.6.320.0060.00614.13
5.6.310.0090.00914.31
5.6.300.0030.01314.26
5.6.290.0100.00714.36
5.6.280.0060.03017.47
5.6.270.0110.00314.60
5.6.260.0080.00814.38
5.6.250.0040.01114.53
5.6.240.0040.00414.37
5.6.230.0140.00414.20
5.6.220.0030.01414.44
5.6.210.0050.04817.36
5.6.200.0070.02316.12
5.6.190.0030.04717.54
5.6.180.0040.02417.59
5.6.170.0130.02517.44
5.6.160.0050.02517.30
5.6.150.0090.04216.13
5.6.140.0100.04016.24
5.6.130.0080.04416.14
5.6.120.0100.04117.50
5.6.110.0080.04217.61
5.6.100.0130.04017.62
5.6.90.0130.03517.68
5.6.80.0080.03517.39
5.6.70.0100.00614.06
5.6.60.0060.00614.28
5.6.50.0030.00714.18
5.6.40.0080.00414.17
5.6.30.0060.01014.14
5.6.20.0030.01213.98
5.6.10.0030.01014.09
5.6.00.0030.00914.27
5.5.380.0030.01314.21
5.5.370.0060.00314.21
5.5.360.0060.00614.41
5.5.350.1660.02417.29
5.5.340.0110.03016.11
5.5.330.0130.03817.37
5.5.320.0350.03317.39
5.5.310.0120.02517.22
5.5.300.0090.04516.17
5.5.290.0030.02316.26
5.5.280.0120.04017.48
5.5.270.0050.04417.30
5.5.260.0030.04517.30
5.5.250.0090.04017.43
5.5.240.0100.04517.09
5.5.230.0030.01014.33
5.5.220.0000.01214.09
5.5.210.0030.00913.93
5.5.200.0000.01814.16
5.5.190.0100.00614.27
5.5.180.0070.00714.35
5.5.170.0060.00314.13
5.5.160.0060.00314.23
5.5.150.0110.00414.06
5.5.140.0060.00914.27
5.5.130.0000.01414.27
5.5.120.0090.00614.14
5.5.110.0030.00713.95
5.5.100.0030.01013.83
5.5.90.0060.00614.32
5.5.80.0060.00613.79
5.5.70.0060.00914.20
5.5.60.0100.00314.00
5.5.50.0060.00613.88
5.5.40.0060.00614.28
5.5.30.0100.00314.16
5.5.20.0060.00914.28
5.5.10.0000.01514.21
5.5.00.0110.00313.87

preferences:
53.26 ms | 401 KiB | 5 Q