3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tax = bcmul("33.95", ".065", 3); // 2.20675 $real_total = bcadd("33.95", "7.87", 3); // 41.82 $real_total = bcadd($real_total, $tax, 3); // 44.02675 echo mask("4111 1111 1111 1111", 0, -4); function bcround($number, $scale = 0) { $fix = "5"; for ($i=0; $i<$scale; $i++) $fix = "0$fix"; $number = bcadd($number, "0.$fix", $scale + 1); return bcdiv($number, "1.0", $scale); } function mask($string, $start = 0, $length = false) { $mask = preg_replace('/([\w])+/', '*', $string); if (!$length) { $mask = substr($mask, $start); $string = substr_replace($string, $mask, $start); } else { $mask = substr($mask, $start, $length); $string = substr_replace($string, $mask, $start, $length); } return $string; }

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.0110.01118.34
8.3.50.0070.01419.89
8.3.40.0090.00618.87
8.3.30.0140.00018.83
8.3.20.0080.00020.16
8.3.10.0040.00420.66
8.3.00.0040.00420.68
8.2.180.0090.00616.75
8.2.170.0070.01022.96
8.2.160.0140.00022.05
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00421.20
8.2.120.0040.00426.35
8.2.110.0070.00319.45
8.2.100.0040.00817.93
8.2.90.0050.00319.17
8.2.80.0030.00717.97
8.2.70.0060.00317.63
8.2.60.0000.00818.04
8.2.50.0060.00318.09
8.2.40.0000.00920.58
8.2.30.0040.00419.57
8.2.20.0070.00017.93
8.2.10.0050.00317.98
8.2.00.0040.00418.16
8.1.280.0090.00925.92
8.1.270.0060.00923.99
8.1.260.0130.00628.09
8.1.250.0040.00428.09
8.1.240.0100.01022.20
8.1.230.0080.00317.64
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.25
8.1.180.0090.00018.10
8.1.170.0030.00718.63
8.1.160.0000.00820.72
8.1.150.0060.00318.98
8.1.140.0000.00819.58
8.1.130.0040.00417.67
8.1.120.0000.00717.66
8.1.110.0080.00017.51
8.1.100.0040.00417.53
8.1.90.0000.00717.59
8.1.80.0070.00017.62
8.1.70.0040.00417.69
8.1.60.0000.00917.75
8.1.50.0030.00617.61
8.1.40.0080.00017.66
8.1.30.0000.00817.78
8.1.20.0040.00417.68
8.1.10.0030.00617.66
8.1.00.0050.00317.48
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0020.00518.44
8.0.270.0000.00717.30
8.0.260.0070.00017.30
8.0.250.0070.00017.17
8.0.240.0070.00017.14
8.0.230.0040.00416.99
8.0.220.0040.00417.05
8.0.210.0000.00717.08
8.0.200.0030.00317.10
8.0.190.0050.00616.98
8.0.180.0050.00316.99
8.0.170.0000.00717.13
8.0.160.0050.00217.09
8.0.150.0000.00716.89
8.0.140.0000.00716.95
8.0.130.0000.00513.33
8.0.120.0040.00417.00
8.0.110.0040.00417.03
8.0.100.0040.00417.01
8.0.90.0000.00716.95
8.0.80.0150.00417.05
8.0.70.0040.00416.95
8.0.60.0030.00617.11
8.0.50.0050.00317.04
8.0.30.0130.00617.13
8.0.20.0100.01017.46
8.0.10.0000.00717.07
8.0.00.0060.01117.02
7.4.330.0050.00016.83
7.4.320.0030.00316.82
7.4.300.0040.00416.83
7.4.290.0030.00316.86
7.4.280.0000.00916.76
7.4.270.0030.00316.77
7.4.260.0030.00516.61
7.4.250.0000.00716.59
7.4.240.0000.00716.59
7.4.230.0070.00016.78
7.4.220.0150.00616.79
7.4.210.0000.01716.73
7.4.200.0030.00316.64
7.4.160.0060.00916.57
7.4.150.0030.01617.40
7.4.140.0120.01317.86
7.4.130.0120.00716.72
7.4.120.0090.00916.73
7.4.110.0090.00916.64
7.4.100.0070.01016.75
7.4.90.0030.01516.80
7.4.80.0120.01219.39
7.4.70.0130.00316.62
7.4.60.0120.00616.81
7.4.50.0080.00816.62
7.4.40.0090.01316.71
7.4.30.0030.01716.64
7.4.00.0070.00715.06
7.3.330.0050.00313.10
7.3.320.0030.00313.32
7.3.310.0070.00016.49
7.3.300.0040.00416.42
7.3.290.0090.00616.48
7.3.280.0090.01016.48
7.3.270.0170.00017.40
7.3.260.0130.01016.80
7.3.250.0120.01016.46
7.3.240.0110.00616.56
7.3.230.0130.00516.46
7.3.210.0100.00716.42
7.3.200.0150.00316.68
7.3.190.0180.00016.46
7.3.180.0130.00316.32
7.3.170.0160.00016.89
7.3.160.0040.01516.22
7.3.10.0040.01516.80
7.3.00.0070.00816.65
7.2.330.0130.00316.70
7.2.320.0130.01316.88
7.2.310.0080.01116.74
7.2.300.0070.01116.86
7.2.290.0130.00316.78
7.2.130.0030.00716.85
7.2.120.0120.00317.11
7.2.110.0070.00717.05
7.2.100.0030.01216.98
7.2.90.0040.00817.13
7.2.80.0130.00016.65
7.2.70.0090.00616.83
7.2.60.0030.01216.96
7.2.50.0070.00817.09
7.2.40.0030.01017.05
7.2.30.0030.00617.07
7.2.20.0060.00917.00
7.2.10.0090.00617.17
7.2.00.0050.00818.26
7.1.250.0060.00915.99
7.1.200.0070.00715.91
7.1.70.0130.00017.47
7.1.60.0180.00719.61
7.1.50.0070.01417.17
7.1.00.0030.07322.47
7.0.200.0000.01616.93
7.0.60.0000.07321.87
7.0.50.0070.05717.95
7.0.40.0030.04720.28
7.0.30.0400.04020.21
7.0.20.0270.07320.33
7.0.10.0130.04720.07
7.0.00.0100.08320.18
5.6.280.0030.07321.00
5.6.210.0070.07720.67
5.6.200.0030.05018.15
5.6.190.0030.08320.77
5.6.180.0300.06320.46
5.6.170.0370.07020.56
5.6.160.0100.05320.55
5.6.150.0100.07718.14
5.6.140.0070.05318.28
5.6.130.0170.07718.18
5.6.120.0070.08021.00
5.6.110.0070.08020.90
5.6.100.0130.07720.99
5.6.90.0070.08321.03
5.6.80.0130.07320.55
5.5.350.4230.04320.43
5.5.340.0070.08017.99
5.5.330.0070.05720.26
5.5.320.0570.04320.29
5.5.310.0300.05320.27
5.5.300.0070.03717.93
5.5.290.0070.06318.09
5.5.280.0070.08020.66
5.5.270.0000.04320.88
5.5.260.0130.06720.86
5.5.250.0000.07320.66
5.5.240.0100.07020.28

preferences:
54.91 ms | 400 KiB | 5 Q