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", -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.0180.00318.68
8.3.50.0070.01419.82
8.3.40.0120.00918.83
8.3.30.0160.00318.79
8.3.20.0080.00020.35
8.3.10.0040.00420.78
8.3.00.0080.00020.77
8.2.180.0070.00716.50
8.2.170.0100.01022.96
8.2.160.0080.00519.42
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00021.02
8.2.120.0000.00826.35
8.2.110.0030.00619.17
8.2.100.0090.00318.04
8.2.90.0060.00319.22
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0000.00917.92
8.2.50.0000.00918.09
8.2.40.0000.00820.44
8.2.30.0000.00719.45
8.2.20.0040.00417.93
8.2.10.0070.00018.15
8.2.00.0040.00418.04
8.1.280.0000.01425.92
8.1.270.0080.00023.92
8.1.260.0050.00328.09
8.1.250.0060.00328.09
8.1.240.0030.00622.17
8.1.230.0000.01117.70
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0090.00017.36
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0030.00618.68
8.1.160.0000.00820.80
8.1.150.0040.00418.93
8.1.140.0040.00419.56
8.1.130.0030.00317.78
8.1.120.0040.00417.54
8.1.110.0000.00817.50
8.1.100.0000.00717.66
8.1.90.0040.00417.69
8.1.80.0070.00017.51
8.1.70.0070.00017.54
8.1.60.0000.00917.64
8.1.50.0000.00817.65
8.1.40.0040.00417.69
8.1.30.0030.00517.86
8.1.20.0060.00317.68
8.1.10.0040.00417.56
8.1.00.0040.00417.59
8.0.300.0030.00618.77
8.0.290.0030.00517.00
8.0.280.0040.00418.57
8.0.270.0070.00017.30
8.0.260.0040.00417.30
8.0.250.0070.00017.04
8.0.240.0040.00417.11
8.0.230.0030.00417.02
8.0.220.0040.00417.12
8.0.210.0000.00717.10
8.0.200.0000.00617.09
8.0.190.0080.00417.14
8.0.180.0040.00417.17
8.0.170.0030.00517.09
8.0.160.0030.00516.96
8.0.150.0040.00416.97
8.0.140.0040.00417.05
8.0.130.0030.00313.42
8.0.120.0040.00417.04
8.0.110.0080.00016.97
8.0.100.0040.00417.11
8.0.90.0040.00317.13
8.0.80.0060.00917.02
8.0.70.0030.00516.97
8.0.60.0040.00417.17
8.0.50.0040.00417.13
8.0.30.0090.01017.05
8.0.20.0110.00817.41
8.0.10.0000.00817.25
8.0.00.0110.00616.91
7.4.330.0050.00016.77
7.4.320.0060.00016.87
7.4.300.0070.00016.88
7.4.290.0030.00316.75
7.4.280.0080.00316.80
7.4.270.0070.00016.82
7.4.260.0050.00316.71
7.4.250.0040.00416.72
7.4.240.0000.00816.70
7.4.230.0040.00416.88
7.4.220.0150.00616.84
7.4.210.0030.01216.86
7.4.200.0020.00516.62
7.4.160.0000.01616.67
7.4.150.0030.01417.40
7.4.140.0150.00717.86
7.4.130.0060.01316.80
7.4.120.0140.00816.66
7.4.110.0090.00916.68
7.4.100.0060.01216.77
7.4.90.0060.01016.63
7.4.80.0180.00419.39
7.4.70.0080.00816.84
7.4.60.0060.01216.80
7.4.50.0090.00616.43
7.4.40.0100.00716.74
7.4.30.0030.01716.80
7.4.00.0090.00915.31
7.3.330.0000.00513.31
7.3.320.0000.00513.10
7.3.310.0070.00016.51
7.3.300.0000.00716.32
7.3.290.0090.00716.48
7.3.280.0080.01116.45
7.3.270.0030.01417.40
7.3.260.0030.01416.79
7.3.240.0130.00716.66
7.3.230.0170.00716.45
7.3.210.0090.00916.40
7.3.200.0090.01016.80
7.3.190.0080.00816.87
7.3.180.0100.00716.78
7.3.170.0060.00916.36
7.3.160.0100.00616.76
7.3.120.0090.00815.22
7.3.110.0050.01115.05
7.3.100.0080.01015.01
7.3.90.0070.00815.09
7.3.80.0070.00715.10
7.3.70.0050.00714.82
7.3.60.0080.00614.93
7.3.50.0030.01214.88
7.3.40.0030.01014.96
7.3.30.0070.00714.98
7.3.20.0060.00916.90
7.3.10.0050.01116.83
7.3.00.0080.00716.75
7.2.330.0110.01116.75
7.2.320.0060.01316.82
7.2.310.0080.01116.77
7.2.300.0100.00716.82
7.2.290.0120.00416.68
7.2.250.0030.01515.36
7.2.240.0080.01215.18
7.2.230.0050.01015.26
7.2.220.0000.01515.23
7.2.210.0030.01114.92
7.2.200.0110.00315.32
7.2.190.0060.01115.14
7.2.180.0110.00015.13
7.2.170.0040.01115.10
7.2.160.0090.00915.27
7.2.150.0120.00317.04
7.2.140.0000.00917.07
7.2.130.0090.00616.97
7.2.120.0100.01017.07
7.2.110.0100.01017.13
7.2.100.0060.00917.16
7.2.90.0060.00917.07
7.2.80.0000.01117.12
7.2.70.0070.00717.17
7.2.60.0020.01217.09
7.2.50.0090.00517.15
7.2.40.0100.00617.00
7.2.30.0120.00017.13
7.2.20.0040.01117.02
7.2.10.0130.00016.94
7.2.00.0090.00618.25
7.1.330.0090.00416.13
7.1.320.0040.01115.91
7.1.310.0090.00316.01
7.1.300.0060.00516.00
7.1.290.0070.00915.84
7.1.280.0070.00315.92
7.1.270.0070.00915.88
7.1.260.0070.00515.70
7.1.250.0090.00015.85
7.1.240.0070.00715.82
7.1.230.0090.00916.04
7.1.220.0060.00616.03
7.1.210.0060.00615.86
7.1.200.0060.00516.03
7.1.190.0040.01215.91
7.1.180.0060.00915.88
7.1.170.0000.01315.99
7.1.160.0060.00615.79
7.1.150.0080.00515.79
7.1.140.0090.00316.04
7.1.130.0030.00915.75
7.1.120.0110.00615.88
7.1.110.0000.01315.68
7.1.100.0030.01315.75
7.1.90.0080.00315.81
7.1.80.0070.00716.02
7.1.70.0060.00816.68
7.1.60.0100.01017.80
7.1.50.0100.00916.49
7.1.40.0070.00715.96
7.1.30.0060.01015.79
7.1.20.0090.00615.84
7.1.10.0000.01315.81
7.1.00.0070.04219.00
7.0.330.0070.00415.59
7.0.320.0030.01315.63
7.0.310.0040.00415.54
7.0.300.0060.00615.46
7.0.290.0000.01415.38
7.0.280.0110.00415.62
7.0.270.0000.01315.53
7.0.260.0120.00415.44
7.0.250.0100.00615.54
7.0.240.0060.00915.52
7.0.230.0040.00715.56
7.0.220.0040.01115.60
7.0.210.0100.00315.39
7.0.200.0080.00716.12
7.0.190.0100.00015.66
7.0.180.0060.00915.74
7.0.170.0030.01015.43
7.0.160.0000.01115.38
7.0.150.0040.01115.48
7.0.140.0040.00815.58
7.0.130.0110.00815.41
7.0.120.0030.01415.43
7.0.110.0120.00615.68
7.0.100.0030.00715.39
7.0.90.0040.01115.61
7.0.80.0100.00315.41
7.0.70.0040.00815.40
7.0.60.0050.02318.64
7.0.50.0070.04516.67
7.0.40.0050.05017.55
7.0.30.0130.02617.48
7.0.20.0130.04117.47
7.0.10.0030.04917.55
7.0.00.0070.04817.53
5.6.400.0030.00614.84
5.6.390.0030.01614.84
5.6.380.0040.01114.84
5.6.370.0100.00314.84
5.6.360.0100.00314.84
5.6.350.0030.01014.84
5.6.340.0090.00614.84
5.6.330.0060.00614.84
5.6.320.0060.00614.84
5.6.310.0060.00614.84
5.6.300.0030.01214.84
5.6.290.0030.01014.84
5.6.280.0000.01314.84
5.6.270.0070.00714.84
5.6.260.0070.00714.84
5.6.250.0070.00714.84
5.6.240.0050.00514.84
5.6.230.0080.00614.84
5.6.220.0070.00314.84
5.6.210.0020.04717.79
5.6.200.0030.03716.52
5.6.190.0070.04717.77
5.6.180.0210.02617.67
5.6.170.0180.04417.67
5.6.160.0030.05117.65
5.6.150.0070.03916.50
5.6.140.0020.03316.51
5.6.130.0140.03816.50
5.6.120.0080.03217.94
5.6.110.0080.04317.91
5.6.100.0080.03517.95
5.6.90.0060.04317.98
5.6.80.0110.04117.62
5.6.70.0070.00714.84
5.6.60.0030.00614.84
5.6.50.0000.01214.84
5.6.40.0090.00614.84
5.6.30.0070.00714.84
5.6.20.0070.00414.84
5.6.10.0030.01014.84
5.6.00.0030.00914.84
5.5.380.0080.00814.84
5.5.370.0030.01014.84
5.5.360.0110.00014.84
5.5.350.2110.02417.64
5.5.340.0050.04516.44
5.5.330.0070.04517.60
5.5.320.0280.02817.60
5.5.310.0150.03517.63
5.5.300.0000.02416.39
5.5.290.0120.03916.40
5.5.280.0070.04717.92
5.5.270.0050.02317.87
5.5.260.0080.04517.76
5.5.250.0070.03417.77
5.5.240.0050.03917.57
5.5.230.0030.01014.84
5.5.220.0120.00314.84
5.5.210.0030.01014.84
5.5.200.0040.01114.84
5.5.190.0000.01414.84
5.5.180.0000.01414.84
5.5.170.0110.00014.84
5.5.160.0030.00914.84
5.5.150.0060.00914.84
5.5.140.0120.00414.84
5.5.130.0120.00314.84
5.5.120.0100.00614.84
5.5.110.0030.01414.84
5.5.100.0000.01314.84
5.5.90.0040.00814.84
5.5.80.0040.00414.84
5.5.70.0030.00814.84
5.5.60.0030.01214.84
5.5.50.0000.01214.84
5.5.40.0080.00414.84
5.5.30.0040.00414.84
5.5.20.0070.00314.84
5.5.10.0100.00314.84
5.5.00.0030.01014.84

preferences:
63.58 ms | 401 KiB | 5 Q