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.0120.00316.75
8.3.50.0070.00718.02
8.3.40.0110.00318.79
8.3.30.0120.00318.84
8.3.20.0000.00820.09
8.3.10.0040.00421.60
8.3.00.0060.00319.91
8.2.180.0090.00618.50
8.2.170.0140.00722.96
8.2.160.0130.00020.47
8.2.150.0170.00324.18
8.2.140.0130.00624.66
8.2.130.0030.00721.02
8.2.120.0040.00426.35
8.2.110.0000.00920.43
8.2.100.0080.00317.80
8.2.90.0030.00619.22
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00717.80
8.2.50.0040.00418.07
8.2.40.0030.00520.99
8.2.30.0040.00420.53
8.2.20.0050.00217.73
8.2.10.0000.00818.03
8.2.00.0000.00917.98
8.1.280.0070.00725.92
8.1.270.0060.00320.26
8.1.260.0060.00328.09
8.1.250.0080.00028.09
8.1.240.0060.00322.14
8.1.230.0080.00417.64
8.1.220.0040.00417.79
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0040.00417.66
8.1.180.0040.00418.10
8.1.170.0030.00518.74
8.1.160.0000.00820.77
8.1.150.0040.00418.87
8.1.140.0030.00519.60
8.1.130.0040.00417.54
8.1.120.0000.00817.47
8.1.110.0000.00817.45
8.1.100.0040.00417.37
8.1.90.0000.00817.46
8.1.80.0000.01117.46
8.1.70.0030.00317.41
8.1.60.0060.00317.60
8.1.50.0000.00817.54
8.1.40.0070.00317.54
8.1.30.0080.00017.56
8.1.20.0000.00817.55
8.1.10.0000.00717.53
8.1.00.0030.00617.44
8.0.300.0020.00518.77
8.0.290.0000.00716.75
8.0.280.0000.00718.42
8.0.270.0070.00017.16
8.0.260.0000.00617.17
8.0.250.0000.00716.89
8.0.240.0000.00716.92
8.0.230.0080.00016.87
8.0.220.0000.00716.94
8.0.210.0070.00016.93
8.0.200.0060.00017.03
8.0.190.0000.00717.01
8.0.180.0070.00016.97
8.0.170.0070.00016.93
8.0.160.0080.00016.93
8.0.150.0090.00017.02
8.0.140.0030.00616.78
8.0.130.0000.00513.41
8.0.120.0000.00816.93
8.0.110.0050.00216.96
8.0.100.0070.00017.00
8.0.90.0050.00216.94
8.0.80.0070.00716.90
8.0.70.0040.00416.81
8.0.60.0040.00416.81
8.0.50.0000.00716.88
8.0.30.0120.00917.17
8.0.20.0100.01017.40
8.0.10.0030.00516.94
8.0.00.0060.01116.80
7.4.330.0050.00016.67
7.4.320.0030.00316.59
7.4.300.0060.00016.39
7.4.290.0000.00716.45
7.4.280.0060.00316.34
7.4.270.0000.00716.48
7.4.260.0030.00316.55
7.4.250.0040.00416.55
7.4.240.0040.00316.54
7.4.230.0050.00216.57
7.4.220.0070.01316.53
7.4.210.0090.00616.63
7.4.200.0020.00516.63
7.4.160.0080.00816.67
7.4.150.0090.00917.40
7.4.140.0190.00617.86
7.4.130.0050.01216.63
7.4.120.0100.00716.57
7.4.110.0030.02016.49
7.4.100.0140.00616.55
7.4.90.0090.01316.58
7.4.80.0220.00019.39
7.4.70.0080.00816.57
7.4.60.0130.00316.48
7.4.50.0000.01216.45
7.4.40.0030.01316.57
7.4.30.0030.01316.60
7.4.00.0070.01115.20
7.3.330.0030.00313.29
7.3.320.0000.00513.14
7.3.310.0070.00016.29
7.3.300.0060.00016.29
7.3.290.0060.00916.36
7.3.280.0080.01016.39
7.3.270.0170.00017.40
7.3.260.0190.00316.62
7.3.250.0110.01116.39
7.3.240.0080.00916.38
7.3.230.0090.01316.50
7.3.210.0140.00716.34
7.3.200.0060.01416.27
7.3.190.0060.01016.30
7.3.180.0060.00916.43
7.3.170.0150.00316.36
7.3.160.0120.00316.36
7.3.120.0090.00915.00
7.3.110.0070.01114.59
7.3.100.0110.00814.70
7.3.90.0100.00315.02
7.3.80.0090.00314.89
7.3.70.0100.00314.88
7.3.60.0040.00814.68
7.3.50.0060.00615.05
7.3.40.0000.00814.70
7.3.30.0070.01114.86
7.3.20.0120.00316.59
7.3.10.0070.01116.68
7.3.00.0130.00316.64
7.2.330.0150.00316.53
7.2.320.0120.00616.38
7.2.310.0090.00616.38
7.2.300.0100.00716.70
7.2.290.0100.00716.32
7.2.250.0090.00914.91
7.2.240.0120.00615.14
7.2.230.0070.01015.13
7.2.220.0100.00614.89
7.2.210.0040.01114.61
7.2.200.0000.01414.83
7.2.190.0000.01414.84
7.2.180.0040.00814.65
7.2.170.0060.00615.08
7.2.160.0030.01714.82
7.2.150.0090.00616.79
7.2.140.0070.00716.57
7.2.130.0070.00716.66
7.2.120.0050.00816.82
7.2.110.0030.00616.89
7.2.100.0070.00716.71
7.2.90.0100.00716.84
7.2.80.0110.00416.67
7.2.70.0060.00916.96
7.2.60.0060.00916.86
7.2.50.0060.00616.93
7.2.40.0060.01316.80
7.2.30.0080.00316.99
7.2.20.0070.01016.74
7.2.10.0060.01016.99
7.2.00.0110.00316.89
7.1.330.0070.01015.73
7.1.320.0120.00315.52
7.1.310.0000.01415.69
7.1.300.0060.00315.80
7.1.290.0030.01215.86
7.1.280.0000.01115.59
7.1.270.0030.01415.80
7.1.260.0090.00015.39
7.1.250.0060.00315.82
7.1.240.0030.00715.83
7.1.230.0030.01315.59
7.1.220.0040.00815.57
7.1.210.0070.01015.60
7.1.200.0060.00615.83
7.1.190.0090.00615.83
7.1.180.0070.00715.63
7.1.170.0060.01215.81
7.1.160.0030.01416.02
7.1.150.0100.00015.74
7.1.140.0110.00715.85
7.1.130.0070.00615.73
7.1.120.0080.00415.80
7.1.110.0130.00015.70
7.1.100.0070.01015.92
7.1.90.0100.00715.55
7.1.80.0080.00015.90
7.1.70.0060.00615.84
7.1.60.0030.00615.91
7.1.50.0100.00715.94
7.1.40.0070.00715.54
7.1.30.0050.00515.55
7.1.20.0070.00715.75
7.1.10.0080.00615.55
7.1.00.0120.03719.07
7.0.330.0030.00715.54
7.0.320.0000.01415.45
7.0.310.0060.00615.34
7.0.300.0090.00615.55
7.0.290.0000.01215.40
7.0.280.0000.01515.13
7.0.270.0100.00315.11
7.0.260.0070.00715.07
7.0.250.0060.00915.24
7.0.240.0070.00715.47
7.0.230.0060.01015.28
7.0.220.0040.00415.35
7.0.210.0090.00015.55
7.0.200.0100.00315.38
7.0.190.0160.00315.61
7.0.180.0070.00715.34
7.0.170.0000.01015.57
7.0.160.0090.00315.45
7.0.150.0080.00315.39
7.0.140.0120.00315.39
7.0.130.0120.00615.36
7.0.120.0000.00815.60
7.0.110.0070.00715.39
7.0.100.0060.01015.34
7.0.90.0080.00315.48
7.0.80.0060.00615.38
7.0.70.0070.00715.62
7.0.60.0050.00515.42
7.0.50.0000.00915.61
7.0.40.0040.00413.33
7.0.30.0040.01113.46
7.0.20.0110.00013.18
7.0.10.0060.00613.66
7.0.00.0000.01213.32
5.6.400.0060.00614.18
5.6.390.0080.00414.38
5.6.380.0000.01714.09
5.6.370.0030.01014.25
5.6.360.0060.00914.15
5.6.350.0030.01014.18
5.6.340.0040.01414.34
5.6.330.0040.01114.33
5.6.320.0070.00414.00
5.6.310.0040.00414.37
5.6.300.0040.01114.57
5.6.290.0070.01014.55
5.6.280.0030.03717.66
5.6.270.0090.00014.35
5.6.260.0070.01014.12
5.6.250.0030.01014.29
5.6.240.0000.01314.18
5.6.230.0000.01114.27
5.6.220.0090.00614.27
5.6.210.0040.01114.10
5.6.200.0030.00914.54
5.6.190.0040.00814.49
5.6.180.0120.00014.26
5.6.170.0070.00414.14
5.6.160.0000.01414.26
5.6.150.0090.03717.59
5.6.140.0070.04217.72
5.6.130.0040.04217.81
5.6.120.0050.03717.64
5.6.110.0030.05017.56
5.6.100.0100.04017.60
5.6.90.0080.03817.61
5.6.80.0060.02817.19
5.6.70.0050.02817.20
5.6.60.0100.03917.36
5.6.50.0040.02917.29
5.6.40.0030.04617.12
5.6.30.0020.03317.38
5.6.20.0070.02817.38
5.6.10.0050.04617.47
5.6.00.0100.03117.31
5.5.380.0110.00314.26
5.5.370.0000.00814.34
5.5.360.0060.00914.51
5.5.350.0060.00614.39
5.5.340.0090.00314.29
5.5.330.0000.01413.88
5.5.320.0070.00714.40
5.5.310.0030.01014.42
5.5.300.0100.04717.66
5.5.290.0060.02717.44
5.5.280.0050.03717.63
5.5.270.0090.04617.41
5.5.260.0130.02317.51
5.5.250.0050.04217.33
5.5.240.0080.02217.22
5.5.230.0060.02817.23
5.5.220.0100.03417.21
5.5.210.0050.04217.08
5.5.200.0030.02717.19
5.5.190.0050.02717.20
5.5.180.0080.04417.20
5.5.170.0040.00714.08
5.5.160.0040.03916.96
5.5.150.0080.03817.20
5.5.140.0020.02517.10
5.5.130.0050.04417.16
5.5.120.0050.04417.18
5.5.110.0040.03917.07
5.5.100.0130.03317.17
5.5.90.0110.03717.17
5.5.80.0070.04017.16
5.5.70.0050.04317.03
5.5.60.0080.03517.20
5.5.50.0100.03917.00
5.5.40.0030.02617.13
5.5.30.0050.04617.19
5.5.20.0050.03917.02
5.5.10.0040.03917.26
5.5.00.0050.04217.10

preferences:
54.1 ms | 400 KiB | 5 Q