3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phoneNumbers = array('41N XR8 L143');//,'CRCCCRZZ65','77U.641.2lL7','N9N 481N117','I00F7CIKOK','A7Z.Z3M.AAM0','G73-V1N-9572','8N5 54WECN85','6BF97B7711','F2W W0718W1','E16 EGTj6JE','EZNGUE2Q0E','6DI.6DW.D0D2','88W 6RW 0HWF'); foreach($phoneNumbers AS $phoneNumber) { $newPhoneNumber = ""; echo count($phoneNumber); for($j=0;$j<count($phoneNumber);$j++){ $number = $phoneNumber[$j]; echo $j."\r\n"; if(!is_numeric($number)){ switch($number){ case "A":; case "B":; case "C": $number = 2;break; case "D":; case "E":; case "F": $number = 3;break; case "G":; case "H":; case "I": $number = 4;break; case "J":; case "K":; case "L": $number = 5;break; case "M":; case "N":; case "O": $number = 6;break; case "P":; case "Q":; case "R":; case "S": $number = 7;break; case "T":; case "U":; case "V": $number = 8;break; case "W":; case "X":; case "Y":; case "Z": $number = 9;break; default : $number = ""; } } $newPhoneNumber = $newPhoneNumber.$number; echo $number; } $newPhoneNumbers[] = implode("-",str_split($newPhoneNumber,3)); } print ($newPhoneNumbers[0]);

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.0150.00618.29
8.3.50.0110.00621.27
8.3.40.0150.00018.82
8.3.30.0100.00320.30
8.3.20.0000.00720.16
8.3.10.0050.00222.09
8.3.00.0080.00022.43
8.2.180.0170.00318.29
8.2.170.0070.00722.96
8.2.160.0150.00622.12
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00820.80
8.2.110.0060.00322.27
8.2.100.0090.00318.03
8.2.90.0000.00819.18
8.2.80.0040.00419.28
8.2.70.0090.00017.50
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0040.00418.02
8.2.30.0030.00619.42
8.2.20.0070.00017.76
8.2.10.0080.00017.93
8.2.00.0050.00317.86
8.1.280.0150.00325.92
8.1.270.0000.00723.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00323.84
8.1.230.0100.00019.15
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0060.00317.13
8.1.190.0040.00417.39
8.1.180.0000.00819.13
8.1.170.0040.00418.47
8.1.160.0040.00418.99
8.1.150.0030.00618.66
8.1.140.0060.00317.41
8.1.130.0000.00717.75
8.1.120.0040.00417.54
8.1.110.0030.00517.48
8.1.100.0020.00517.44
8.1.90.0040.00317.57
8.1.80.0000.00717.35
8.1.70.0000.00717.52
8.1.60.0000.00917.64
8.1.50.0000.00717.46
8.1.40.0040.00417.57
8.1.30.0050.00317.53
8.1.20.0000.00817.60
8.1.10.0030.00517.63
8.1.00.0000.00817.53
8.0.300.0050.00218.77
8.0.290.0030.00517.18
8.0.280.0030.00318.44
8.0.270.0000.00817.30
8.0.260.0000.00616.83
8.0.250.0030.00316.96
8.0.240.0000.01017.03
8.0.230.0030.00316.96
8.0.220.0030.00416.88
8.0.210.0090.00016.98
8.0.200.0040.00416.96
8.0.190.0040.00416.98
8.0.180.0000.00717.06
8.0.170.0040.00416.92
8.0.160.0040.00416.86
8.0.150.0000.00716.90
8.0.140.0050.00216.86
8.0.130.0030.00313.45
8.0.120.0050.00317.01
8.0.110.0000.00817.03
8.0.100.0040.00417.05
8.0.90.0040.00417.04
8.0.80.0030.01217.00
8.0.70.0050.00216.93
8.0.60.0000.00716.97
8.0.50.0000.00817.05
8.0.30.0150.00517.16
8.0.20.0120.00817.40
8.0.10.0040.00416.92
8.0.00.0110.00716.78
7.4.330.0030.00315.00
7.4.320.0000.00716.54
7.4.300.0060.00016.56
7.4.290.0070.00016.44
7.4.280.0030.00616.54
7.4.270.0060.00316.61
7.4.260.0030.00313.28
7.4.250.0040.00416.55
7.4.240.0020.00516.62
7.4.230.0000.00716.73
7.4.220.0090.00916.51
7.4.210.0070.01016.66
7.4.200.0040.00416.71
7.4.190.0030.00316.68
7.4.160.0130.00816.42
7.4.150.0110.00717.40
7.4.140.0130.00717.86
7.4.130.0090.00616.64
7.4.120.0120.00516.56
7.4.110.0070.01716.51
7.4.100.0080.00816.71
7.4.90.0060.01216.43
7.4.80.0090.01119.39
7.4.70.0060.00916.57
7.4.60.0070.01316.55
7.4.50.0030.00516.48
7.4.40.0030.01022.77
7.4.30.0090.00816.61
7.4.00.0030.01114.90
7.3.330.0050.00013.29
7.3.320.0000.00613.30
7.3.310.0000.00616.27
7.3.300.0000.00616.32
7.3.290.0070.00716.34
7.3.280.0110.00516.35
7.3.270.0160.00017.40
7.3.260.0090.00916.49
7.3.250.0150.00716.55
7.3.240.0100.00616.36
7.3.230.0110.00416.45
7.3.210.0170.00416.50
7.3.200.0180.00319.39
7.3.190.0090.01216.34
7.3.180.0120.00316.43
7.3.170.0100.00716.71
7.3.160.0130.00616.45
7.3.120.0070.01114.82
7.3.110.0060.01014.82
7.3.100.0050.01014.87
7.3.90.0040.00914.64
7.3.80.0100.00315.00
7.3.70.0030.00914.82
7.3.60.0070.00614.92
7.3.50.0070.00814.81
7.3.40.0060.00814.89
7.3.30.0040.00514.79
7.3.20.0030.00816.63
7.3.10.0090.00516.73
7.3.00.0060.00716.69
7.2.330.0090.00916.87
7.2.320.0080.00916.79
7.2.310.0160.01016.81
7.2.300.0040.01116.73
7.2.290.0050.01116.88
7.2.250.0080.01015.03
7.2.240.0090.01015.15
7.2.230.0050.01015.12
7.2.220.0060.00815.08
7.2.210.0080.00614.98
7.2.200.0080.00615.02
7.2.190.0060.00815.06
7.2.180.0080.00815.15
7.2.170.0070.00715.06
7.2.130.0030.01216.72
7.2.120.0060.00916.57
7.2.110.0070.00317.05
7.2.100.0090.00616.80
7.2.90.0120.00316.96
7.2.80.0030.00916.95
7.2.70.0090.00617.05
7.2.60.0120.00416.95
7.2.50.0030.01216.95
7.2.40.0100.00016.78
7.2.30.0070.00716.98
7.2.20.0000.01416.85
7.2.10.0080.00516.91
7.2.00.0060.00718.12
7.1.330.0050.00815.70
7.1.320.0050.00615.73
7.1.310.0070.00615.82
7.1.300.0040.01015.71
7.1.290.0060.00415.65
7.1.280.0060.00715.85
7.1.270.0050.00715.80
7.1.260.0060.00715.86
7.1.250.0120.00315.62
7.1.240.0070.01015.96
7.1.230.0070.00715.75
7.1.220.0070.00715.97
7.1.210.0030.01016.03
7.1.200.0010.01115.76
7.1.190.0040.01015.81
7.1.180.0070.00715.57
7.1.170.0030.00715.64
7.1.160.0000.01015.75
7.1.150.0130.00016.05
7.1.140.0060.00315.52
7.1.130.0090.00615.60
7.1.120.0060.00615.84
7.1.110.0090.00315.90
7.1.100.0050.00717.04
7.1.90.0000.01015.64
7.1.80.0000.01515.86
7.1.70.0020.01016.53
7.1.60.0110.00517.45
7.1.50.0100.00816.37
7.1.40.0060.00915.94
7.1.30.0060.00315.75
7.1.20.0070.00715.59
7.1.10.0000.01115.97
7.1.00.0060.03719.11
7.0.330.0100.00315.62
7.0.320.0000.01315.47
7.0.310.0000.01415.60
7.0.300.0070.00715.50
7.0.290.0030.01015.16
7.0.280.0000.01415.55
7.0.270.0060.00315.18
7.0.260.0100.00015.18
7.0.250.0070.00315.49
7.0.240.0060.00615.59
7.0.230.0030.00915.63
7.0.220.0040.00715.34
7.0.210.0040.01115.25
7.0.200.0120.00816.06
7.0.190.0030.00715.44
7.0.180.0030.01015.28
7.0.170.0120.00415.19
7.0.160.0000.01015.50
7.0.150.0100.00715.38
7.0.140.0050.04218.57
7.0.130.0070.00715.47
7.0.120.0030.00915.41
7.0.110.0070.00715.17
7.0.100.0170.03517.73
7.0.90.0150.03217.67
7.0.80.0200.03917.63
7.0.70.0170.03817.65
7.0.60.0130.04017.68
7.0.50.0130.03317.81
7.0.40.0030.03916.65
7.0.30.0050.04016.86
7.0.20.0100.04216.76
7.0.10.0060.04516.69
7.0.00.0120.04316.90
5.6.380.0030.01014.16
5.6.370.0060.00914.12
5.6.360.0060.00914.31
5.6.350.0080.00814.45
5.6.340.0100.00014.72
5.6.330.0040.01114.32
5.6.320.0040.00814.10
5.6.310.0060.00314.52
5.6.300.0070.00714.78
5.6.290.0030.01413.96
5.6.280.0040.04217.84
5.6.270.0030.00914.73
5.6.260.0070.00714.36
5.6.250.0050.03317.56
5.6.240.0030.04817.53
5.6.230.0120.03517.59
5.6.220.0100.04217.59
5.6.210.0060.02617.57
5.6.200.0110.04117.64
5.6.190.0100.04017.85
5.6.180.0050.04717.81
5.6.170.0070.04717.62
5.6.160.0110.04017.78
5.6.150.0030.03117.63
5.6.140.0100.04217.70
5.6.130.0060.04317.79
5.6.120.0050.02517.82
5.6.110.0030.02617.70
5.6.100.0050.02717.67
5.6.90.0050.02517.70
5.6.80.0080.02017.57
5.6.70.0020.03917.28
5.6.60.0090.01317.23
5.6.50.0080.02017.28
5.6.40.0070.02317.28
5.6.30.0120.01817.41
5.6.20.0080.02017.19
5.6.10.0030.02717.44
5.6.00.0030.02317.35
5.5.380.0040.04215.90
5.5.370.0100.04015.91
5.5.360.0080.03515.69
5.5.350.0090.04215.86
5.5.340.0050.03916.07
5.5.330.0050.04216.00
5.5.320.0110.02015.95
5.5.310.0060.04315.99
5.5.300.0090.03816.03
5.5.290.0050.03816.12
5.5.280.0050.03216.06
5.5.270.0050.02616.10
5.5.260.0110.02216.09
5.5.250.0050.02215.96
5.5.240.0050.02215.61
5.5.230.0050.01915.70
5.5.220.0030.02015.64
5.5.210.0050.01915.54
5.5.200.0060.02015.71
5.5.190.0040.02215.66
5.5.180.0030.02215.61
5.5.170.0060.00610.70
5.5.160.0060.02115.70
5.5.150.0080.02115.76
5.5.140.0080.01815.55
5.5.130.0070.02215.68
5.5.120.0020.02415.60
5.5.110.0000.02515.68
5.5.100.0020.01915.68
5.5.90.0100.02115.54
5.5.80.0000.02715.59
5.5.70.0050.02115.55
5.5.60.0050.02115.50
5.5.50.0050.02215.53
5.5.40.0030.02315.55
5.5.30.0050.01715.70
5.5.20.0050.02215.64
5.5.10.0070.02015.68
5.5.00.0050.02015.67
5.4.450.0020.02915.27
5.4.440.0050.02615.29
5.4.430.0060.02315.11
5.4.420.0040.02415.31
5.4.410.0050.01915.25
5.4.400.0060.02515.06
5.4.390.0000.02815.06
5.4.380.0030.01915.06
5.4.370.0100.01515.08
5.4.360.0070.01815.03
5.4.350.0050.02115.09
5.4.340.0040.02115.11
5.4.330.0050.00211.00
5.4.320.0030.02214.95
5.4.310.0030.02414.87
5.4.300.0030.02215.04
5.4.290.0110.01515.20
5.4.280.0070.02214.97
5.4.270.0030.02114.93
5.4.260.0030.02314.91
5.4.250.0040.01815.09
5.4.240.0030.02015.02
5.4.230.0040.02015.13
5.4.220.0020.01915.11
5.4.210.0070.02015.07
5.4.200.0030.02215.03
5.4.190.0080.01714.93
5.4.180.0030.02114.96
5.4.170.0050.02014.95
5.4.160.0040.02115.04
5.4.150.0020.02415.14
5.4.140.0060.01613.70
5.4.130.0070.01813.69
5.4.120.0070.01513.72
5.4.110.0050.02213.76
5.4.100.0050.01713.53
5.4.90.0050.02113.53
5.4.80.0030.04113.75
5.4.70.0050.04213.71
5.4.60.0060.03813.80
5.4.50.0020.04013.72
5.4.40.0070.03813.75
5.4.30.0090.03513.65
5.4.20.0050.03313.66
5.4.10.0080.03813.73
5.4.00.0030.04013.36
5.3.290.0030.02112.57
5.3.280.0080.02012.60
5.3.270.0050.02412.56
5.3.260.0020.02312.60
5.3.250.0020.02312.47
5.3.240.0060.01712.54
5.3.230.0030.02012.50
5.3.220.0020.02012.48
5.3.210.0030.01812.42
5.3.200.0070.01512.50
5.3.190.0060.04012.51
5.3.180.0080.02812.57
5.3.170.0060.03512.63
5.3.160.0060.04012.53
5.3.150.0090.04212.52
5.3.140.0050.04212.62
5.3.130.0070.04212.50
5.3.120.0080.01812.43
5.3.110.0050.02412.57
5.3.100.0060.02212.32
5.3.90.0080.03512.28
5.3.80.0050.04012.17
5.3.70.0080.03312.21
5.3.60.0050.02312.08
5.3.50.0100.03612.18
5.3.40.0040.03912.15
5.3.30.0030.03512.13
5.3.20.0060.03712.04
5.3.10.0070.02811.93
5.3.00.0030.03811.79
5.2.170.0050.02510.53
5.2.160.0090.02310.52
5.2.150.0050.03210.58
5.2.140.0000.02010.45
5.2.130.0020.03510.52
5.2.120.0000.03210.52
5.2.110.0060.03010.46
5.2.100.0030.03110.52
5.2.90.0000.03510.52
5.2.80.0030.03510.51
5.2.70.0040.02010.52
5.2.60.0010.02310.49
5.2.50.0050.03210.42
5.2.40.0070.01710.37
5.2.30.0020.02210.44
5.2.20.0070.03210.39
5.2.10.0050.03210.47
5.2.00.0050.02710.33
5.1.60.0050.03210.01
5.1.50.0030.01810.02
5.1.40.0020.0199.88
5.1.30.0030.02710.17
5.1.20.0000.03410.12
5.1.10.0040.03110.03
5.1.00.0040.01710.03
5.0.50.0010.0239.25
5.0.40.0020.0209.24
5.0.30.0100.0139.24
5.0.20.0060.0209.24
5.0.10.0080.0089.24
5.0.00.0060.0329.24
4.4.90.0000.0199.24
4.4.80.0050.0189.24
4.4.70.0030.0139.24
4.4.60.0040.0159.24
4.4.50.0030.0179.24
4.4.40.0000.0329.24
4.4.30.0030.0209.24
4.4.20.0000.0219.24
4.4.10.0020.0189.24
4.4.00.0000.0309.24
4.3.110.0010.0139.24
4.3.100.0050.0199.24
4.3.90.0030.0139.24
4.3.80.0030.0159.24
4.3.70.0030.0169.24
4.3.60.0030.0189.24
4.3.50.0020.0209.24
4.3.40.0030.0279.24
4.3.30.0020.0229.24
4.3.20.0030.0209.24
4.3.10.0000.0209.24
4.3.00.0020.0099.24

preferences:
45.62 ms | 401 KiB | 5 Q