3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iban = strtoupper(str_replace(' ', '', '1231')); $iban = substr($iban, 4) . substr($iban, 0, 4); $iban = str_replace( array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'), array('10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35'), $iban ); $sum = 0; for ($i = 0; $i < strlen($iban); $i++) { $sum *= 10; $sum += intval(substr($iban, $i, 1)); $sum %= 97; } return $sum == 1;

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.70.0090.00616.75
8.3.60.0150.00318.48
8.3.50.0120.00722.05
8.3.40.0120.00318.77
8.3.30.0030.01318.92
8.3.20.0070.00020.34
8.3.10.0050.00321.86
8.3.00.0040.00417.68
8.2.180.0140.00716.38
8.2.170.0110.01122.96
8.2.160.0070.00720.53
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0080.00020.91
8.2.110.0090.00022.22
8.2.100.0090.00317.84
8.2.90.0000.00719.13
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00818.04
8.2.50.0060.00318.07
8.2.40.0090.00019.95
8.2.30.0000.00917.96
8.2.20.0050.00217.72
8.2.10.0000.00718.09
8.2.00.0000.00917.72
8.1.280.0120.00325.92
8.1.270.0030.00623.92
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00323.83
8.1.230.0000.01019.16
8.1.220.0060.00317.74
8.1.210.0090.00018.77
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0030.00518.67
8.1.160.0040.00422.10
8.1.150.0070.00018.84
8.1.140.0070.00017.55
8.1.130.0000.00717.77
8.1.120.0030.00317.55
8.1.110.0070.00017.39
8.1.100.0040.00317.52
8.1.90.0000.00817.38
8.1.80.0040.00417.38
8.1.70.0040.00417.48
8.1.60.0040.00417.63
8.1.50.0030.00517.54
8.1.40.0030.00617.50
8.1.30.0060.00317.64
8.1.20.0050.00217.52
8.1.10.0040.00417.45
8.1.00.0040.00417.44
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.47
8.0.270.0030.00317.23
8.0.260.0000.00717.21
8.0.250.0030.00316.88
8.0.240.0030.00316.88
8.0.230.0080.00016.92
8.0.220.0070.00016.95
8.0.210.0060.00016.89
8.0.200.0000.00616.83
8.0.190.0080.00017.03
8.0.180.0040.00416.98
8.0.170.0070.00017.02
8.0.160.0000.00716.88
8.0.150.0000.00716.79
8.0.140.0040.00416.79
8.0.130.0000.00613.35
8.0.120.0000.00716.92
8.0.110.0050.00216.95
8.0.100.0000.00816.75
8.0.90.0040.00416.77
8.0.80.0040.01516.95
8.0.70.0000.00816.91
8.0.60.0000.00716.92
8.0.50.0040.00416.91
8.0.30.0170.00517.34
8.0.20.0120.00717.40
8.0.10.0000.00717.00
8.0.00.0090.00916.98
7.4.330.0030.00315.00
7.4.320.0030.00316.46
7.4.300.0030.00316.55
7.4.290.0070.00016.56
7.4.280.0040.00416.52
7.4.270.0040.00416.44
7.4.260.0030.00316.59
7.4.250.0040.00416.57
7.4.240.0000.00716.51
7.4.230.0070.00016.43
7.4.220.0120.00616.38
7.4.210.0070.00716.54
7.4.200.0030.00316.68
7.4.160.0080.00816.37
7.4.150.0140.01217.40
7.4.140.0140.00317.86
7.4.130.0040.02216.48
7.4.120.0050.01216.49
7.4.110.0080.01516.48
7.4.100.0100.00716.60
7.4.90.0110.01516.51
7.4.80.0070.01019.39
7.4.70.0120.00516.53
7.4.60.0040.01316.41
7.4.50.0040.00416.41
7.4.40.0040.01816.58
7.4.30.0100.00616.50
7.4.00.0050.01215.08
7.3.330.0070.00013.20
7.3.320.0050.00013.06
7.3.310.0040.00316.39
7.3.300.0030.00316.32
7.3.290.0070.00716.43
7.3.280.0090.00916.34
7.3.270.0150.00317.40
7.3.260.0130.00416.69
7.3.240.0130.01016.30
7.3.230.0130.00916.40
7.3.210.0160.00016.45
7.3.200.0140.00719.39
7.3.190.0030.01816.46
7.3.180.0070.01016.43
7.3.170.0090.01216.41
7.3.160.0090.01216.46
7.3.120.0080.00614.72
7.3.110.0100.00714.84
7.3.100.0080.00714.90
7.3.90.0030.01014.84
7.3.80.0080.00414.89
7.3.70.0040.01114.85
7.3.60.0060.00814.89
7.3.50.0070.00714.49
7.3.40.0080.00514.70
7.3.30.0050.00914.94
7.3.20.0050.01016.55
7.3.10.0020.01416.69
7.3.00.0060.00816.50
7.2.330.0100.00616.72
7.2.320.0090.01316.79
7.2.310.0030.01416.71
7.2.300.0120.00416.61
7.2.290.0140.00316.52
7.2.250.0090.00915.14
7.2.240.0100.00915.12
7.2.230.0050.01015.04
7.2.220.0020.00914.84
7.2.210.0090.00315.18
7.2.200.0070.00915.00
7.2.190.0040.00614.97
7.2.180.0070.00615.01
7.2.170.0050.01115.00
7.2.00.0090.00319.45
7.1.330.0040.01115.82
7.1.320.0050.00615.73
7.1.310.0050.01015.75
7.1.300.0020.01215.87
7.1.290.0010.00915.73
7.1.280.0050.01015.78
7.1.270.0070.00415.79
7.1.260.0070.00715.70
7.1.100.0060.00318.08
7.1.70.0000.00717.16
7.1.60.0140.01119.25
7.1.50.0030.01917.04
7.1.00.0000.08022.36
7.0.200.0000.01016.69
7.0.140.0030.07322.00
7.0.60.0100.08320.07
7.0.50.0000.05717.91
7.0.40.0030.04320.27
7.0.30.0430.07020.20
7.0.20.0270.08720.17
7.0.10.0000.05720.20
7.0.00.0030.06320.17
5.6.280.0000.07721.11
5.6.210.0070.06320.62
5.6.200.0100.08318.21
5.6.190.0070.08320.43
5.6.180.0270.09320.77
5.6.170.0330.08020.43
5.6.160.0100.08020.47
5.6.150.0070.07018.14
5.6.140.0030.08318.24
5.6.130.0170.04018.25
5.6.120.0000.08321.03
5.6.110.0200.08321.14
5.6.100.0100.07021.03
5.6.90.0070.07021.01
5.6.80.0070.03720.36
5.5.350.0300.06320.39
5.5.340.0030.09017.93
5.5.330.0070.05320.21
5.5.320.0330.03720.43
5.5.310.0200.04320.29
5.5.300.0030.04317.98
5.5.290.0070.08018.01
5.5.280.0070.08020.89
5.5.270.0070.07720.80
5.5.260.0130.07720.88
5.5.250.0100.04020.59
5.5.240.0000.03720.35
5.4.450.0130.04319.46
5.4.440.0400.04319.42
5.4.430.0400.04719.41
5.4.420.0200.04719.38
5.4.410.0170.04719.28
5.4.400.0130.03718.89
5.4.390.0130.04018.77
5.4.380.0430.05318.68
5.4.370.0070.05718.74
5.4.360.0330.05318.69
5.4.350.0300.05318.72
5.4.340.0430.05018.64
5.4.320.0090.04212.47
5.4.310.0060.04212.47
5.4.300.0060.03612.47
5.4.290.0040.03912.46
5.4.280.0070.03612.36
5.4.270.0030.04012.36
5.4.260.0020.04412.37
5.4.250.0090.05012.37
5.4.240.0080.03612.37
5.4.230.0040.03912.36
5.4.220.0050.03712.36
5.4.210.0060.03512.36
5.4.200.0050.03812.36
5.4.190.0050.04012.35
5.4.180.0030.03912.35
5.4.170.0050.03712.36
5.4.160.0020.04312.36
5.4.150.0090.04612.36
5.4.140.0100.05412.04
5.4.130.0080.04912.03
5.4.120.0100.05411.98
5.4.110.0030.05511.98
5.4.100.0080.04611.98
5.4.90.0070.05311.98
5.4.80.0100.05211.98
5.4.70.0080.04611.98
5.4.60.0070.04411.98
5.4.50.0050.04011.98
5.4.40.0080.03611.96
5.4.30.0050.04011.96
5.4.20.0060.04011.97
5.4.10.0100.03111.97
5.4.00.0030.03911.46
5.3.290.0090.03912.80
5.3.280.0100.03712.71
5.3.270.0060.04012.72
5.3.260.0050.04012.72
5.3.250.0080.04512.72
5.3.240.0060.03712.72
5.3.230.0070.03612.71
5.3.220.0060.04612.68
5.3.210.0040.04112.68
5.3.200.0070.03512.68
5.3.190.0070.03612.68
5.3.180.0050.03712.68
5.3.170.0030.04012.67
5.3.160.0060.03612.67
5.3.150.0050.03812.67
5.3.140.0050.03712.66
5.3.130.0060.03812.66
5.3.120.0060.03812.66
5.3.110.0050.03912.66
5.3.100.0050.03812.12
5.3.90.0040.03912.08
5.3.80.0070.03512.08
5.3.70.0050.03712.07
5.3.60.0040.03912.06
5.3.50.0060.03712.00
5.3.40.0060.03712.00
5.3.30.0070.03411.96
5.3.20.0040.03711.74
5.3.10.0090.04611.70
5.3.00.0100.04611.69
5.2.170.0060.0379.20
5.2.160.0040.0319.20
5.2.150.0070.0299.20
5.2.140.0050.0309.19
5.2.130.0030.0319.16
5.2.120.0070.0389.16
5.2.110.0090.0269.16
5.2.100.0060.0289.16
5.2.90.0060.0299.16
5.2.80.0040.0319.16
5.2.70.0050.0309.15
5.2.60.0080.0349.11
5.2.50.0050.0299.07
5.2.40.0050.0289.05
5.2.30.0030.0319.03
5.2.20.0070.0279.02
5.2.10.0060.0278.94
5.2.00.0050.0288.80
5.1.60.0030.0258.09
5.1.50.0060.0318.08
5.1.40.0060.0248.06
5.1.30.0040.0278.41
5.1.20.0040.0278.44
5.1.10.0030.0268.16
5.1.00.0030.0298.16
5.0.50.0010.0246.64
5.0.40.0050.0226.50
5.0.30.0030.0326.31
5.0.20.0040.0196.28
5.0.10.0050.0196.26
5.0.00.0040.0316.25
4.4.90.0030.0164.78
4.4.80.0050.0154.75
4.4.70.0040.0154.75
4.4.60.0020.0174.75
4.4.50.0060.0134.77
4.4.40.0020.0274.71
4.4.30.0020.0184.76
4.4.20.0030.0214.84
4.4.10.0040.0214.85
4.4.00.0060.0424.76
4.3.110.0020.0284.67
4.3.100.0010.0174.66
4.3.90.0040.0144.63
4.3.80.0030.0254.59
4.3.70.0020.0204.63
4.3.60.0010.0174.63
4.3.50.0010.0194.63
4.3.40.0060.0254.54
4.3.30.0010.0183.30
4.3.20.0040.0143.28
4.3.10.0010.0173.24
4.3.00.0000.01715.27

preferences:
56.06 ms | 401 KiB | 5 Q