3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ReformatPhoneNumber($number) { $isValid = preg_match('/^(\d[ |-]*){6,11}\d$/i', $number, $result); if(!$isValid) { //throw new Exception('Division by zero.'); } return str_replace(array(' ' , '-'), array('', ''), $number); }

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.0060.01316.50
8.3.50.0120.00522.03
8.3.40.0150.00618.44
8.3.30.0070.00718.46
8.3.20.0040.00418.52
8.3.10.0000.00820.95
8.3.00.0000.00821.73
8.2.180.0110.00716.32
8.2.170.0110.00722.96
8.2.160.0070.00720.47
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00321.04
8.2.110.0000.00921.00
8.2.100.0110.00017.59
8.2.90.0050.00219.04
8.2.80.0050.00217.97
8.2.70.0050.00317.50
8.2.60.0000.00717.80
8.2.50.0030.00618.07
8.2.40.0030.00518.09
8.2.30.0030.00619.78
8.2.20.0060.00317.52
8.2.10.0040.00417.46
8.2.00.0030.00717.54
8.1.280.0100.00725.92
8.1.270.0070.00023.99
8.1.260.0040.01226.35
8.1.250.0080.00028.09
8.1.240.0090.00622.22
8.1.230.0080.00420.78
8.1.220.0000.00818.77
8.1.210.0040.00418.77
8.1.200.0100.00017.13
8.1.190.0070.00017.41
8.1.180.0070.00018.10
8.1.170.0080.00018.52
8.1.160.0040.00418.67
8.1.150.0050.00318.56
8.1.140.0000.00817.22
8.1.130.0070.00017.74
8.1.120.0050.00317.23
8.1.110.0070.00017.21
8.1.100.0040.00417.32
8.1.90.0030.00517.36
8.1.80.0040.00417.22
8.1.70.0000.00717.21
8.1.60.0040.00417.44
8.1.50.0000.00817.34
8.1.40.0000.00817.38
8.1.30.0000.00717.47
8.1.20.0040.00417.52
8.1.10.0040.00417.42
8.1.00.0000.00817.30
8.0.300.0040.00419.85
8.0.290.0030.00616.58
8.0.280.0030.00318.30
8.0.270.0040.00417.02
8.0.260.0060.00016.69
8.0.250.0000.00716.75
8.0.240.0000.00816.81
8.0.230.0080.00016.70
8.0.220.0000.00716.62
8.0.210.0030.00316.61
8.0.200.0040.00416.65
8.0.190.0000.00716.68
8.0.180.0060.00316.79
8.0.170.0030.00516.80
8.0.160.0000.00716.64
8.0.150.0040.00416.64
8.0.140.0070.00016.70
8.0.130.0060.00013.20
8.0.120.0040.00416.73
8.0.110.0030.00616.70
8.0.100.0070.00016.84
8.0.90.0030.00616.70
8.0.80.0150.00616.80
8.0.70.0000.00716.66
8.0.60.0000.00816.64
8.0.50.0040.00416.77
8.0.30.0110.00716.97
8.0.20.0110.00817.40
8.0.10.0040.00416.80
8.0.00.0110.00716.72
7.4.330.0060.00014.53
7.4.320.0030.00316.38
7.4.300.0040.00416.37
7.4.290.0000.00716.46
7.4.280.0080.00016.41
7.4.270.0070.00016.39
7.4.260.0050.00013.14
7.4.250.0040.00416.43
7.4.240.0030.00516.38
7.4.230.0030.00316.53
7.4.220.0060.01216.40
7.4.210.0070.00816.38
7.4.200.0030.00316.37
7.4.190.0050.00216.55
7.4.160.0090.00616.41
7.4.150.0070.01117.40
7.4.140.0120.00617.86
7.4.130.0080.00916.32
7.4.120.0060.01116.34
7.4.110.0060.01616.40
7.4.100.0070.01016.53
7.4.90.0040.01316.19
7.4.80.0060.01019.37
7.4.70.0050.01116.31
7.4.60.0090.00916.19
7.4.50.0000.00916.24
7.4.40.0120.00322.27
7.4.30.0100.00716.32
7.4.00.0090.00914.77
7.3.330.0030.00213.00
7.3.320.0030.00313.15
7.3.310.0060.00016.16
7.3.300.0030.00316.17
7.3.290.0070.00716.14
7.3.280.0060.01116.14
7.3.270.0100.00717.40
7.3.260.0100.01018.24
7.3.250.0100.00716.34
7.3.240.0090.01316.36
7.3.230.0030.01316.45
7.3.210.0070.01116.23
7.3.200.0120.00919.39
7.3.190.0080.01116.44
7.3.180.0130.00416.28
7.3.170.0130.00316.27
7.3.160.0090.00616.19
7.3.120.0030.01314.71
7.3.10.0100.00716.21
7.3.00.0120.00316.30
7.2.330.0070.01016.32
7.2.320.0070.01016.48
7.2.310.0000.02016.45
7.2.300.0090.00916.18
7.2.290.0140.00616.47
7.2.130.0120.00616.03
7.2.120.0030.00616.40
7.2.110.0030.01016.43
7.2.100.0070.00716.52
7.2.90.0030.01316.26
7.2.80.0090.00616.23
7.2.70.0070.00716.60
7.2.60.0080.00816.22
7.2.50.0130.00316.71
7.2.40.0040.01216.55
7.2.30.0120.00616.84
7.2.20.0090.01416.02
7.2.10.0190.00416.08
7.2.00.0080.01017.76
7.1.250.0190.00315.41
7.1.100.0060.00617.95
7.1.70.0000.00716.66
7.1.60.0120.00619.40
7.1.50.0100.01416.97
7.1.00.0030.05022.45
7.0.200.0000.00916.52
7.0.140.0070.06722.02
7.0.70.0170.05721.65
7.0.60.0070.05721.68
7.0.50.0030.04322.00
7.0.40.0070.03720.08
7.0.30.0030.04720.05
7.0.20.0100.05020.08
7.0.10.0030.04020.03
7.0.00.0030.05720.16
5.6.220.0170.06720.54
5.6.210.0030.06720.64
5.6.200.0000.06321.04
5.6.190.0000.04321.17
5.6.180.0030.04321.07
5.6.170.0030.04021.07
5.6.160.0030.04720.95
5.6.150.0000.05021.02
5.6.140.0030.08021.16
5.6.130.0030.08721.09
5.6.120.0030.08321.07
5.6.110.0030.08721.07
5.6.100.0070.08020.96
5.6.90.0070.07721.09
5.6.80.0000.07720.46
5.6.70.0000.08320.41
5.6.60.0100.07320.39
5.6.50.0000.06720.34
5.6.40.0070.08020.31
5.6.30.0000.08020.39
5.6.20.0070.08020.29
5.6.10.0030.08020.29
5.6.00.0100.07020.42
5.5.360.0100.07720.53
5.5.350.0100.06020.32
5.5.340.0100.07320.86
5.5.330.0030.04020.76
5.5.320.0070.07720.92
5.5.310.0000.09020.84
5.5.300.0030.08020.82
5.5.290.0070.06020.88
5.5.280.0030.08720.91
5.5.270.0100.07320.76
5.5.260.0100.07720.77
5.5.250.0070.08020.60
5.5.240.0070.07720.27
5.5.230.0130.07320.24
5.5.220.0030.08320.28
5.5.210.0000.08020.15
5.5.200.0000.05720.29
5.5.190.0070.07020.16
5.5.180.0030.07020.11
5.5.160.0070.06720.15
5.5.150.0000.08019.98
5.5.140.0070.07320.12
5.5.130.0030.07020.22
5.5.120.0030.09020.23
5.5.110.0030.08320.14
5.5.100.0070.05720.10
5.5.90.0000.06320.06
5.5.80.0130.06720.08
5.5.70.0070.08320.09
5.5.60.0030.08019.99
5.5.50.0030.07020.01
5.5.40.0030.08020.03
5.5.30.0030.08320.04
5.5.20.0130.06020.05
5.5.10.0100.08019.99
5.5.00.0000.06720.03
5.4.450.0070.08019.43
5.4.440.0030.08719.45
5.4.430.0000.08019.34
5.4.420.0030.08019.55
5.4.410.0100.07319.07
5.4.400.0070.04718.95
5.4.390.0030.07719.04
5.4.380.0030.08018.84
5.4.370.0070.05319.02
5.4.360.0030.08018.98
5.4.350.0000.07718.90
5.4.340.0030.07018.85
5.4.320.0030.08318.90
5.4.310.0100.06319.16
5.4.300.0070.07719.20
5.4.290.0030.07319.15
5.4.280.0000.07319.12
5.4.270.0030.07319.10
5.4.260.0030.07019.22
5.4.250.0030.07019.11
5.4.240.0100.06719.04
5.4.230.0070.07019.02
5.4.220.0030.06319.20
5.4.210.0030.08019.03
5.4.200.0030.07319.02
5.4.190.0130.05718.84
5.4.180.0100.07019.13
5.4.170.0070.07719.07
5.4.160.0070.07719.16
5.4.150.0000.07318.86
5.4.140.0030.07316.32
5.4.130.0070.06716.33
5.4.120.0000.06316.45
5.4.110.0000.07316.48
5.4.100.0070.06016.42
5.4.90.0070.07016.48
5.4.80.0100.07316.41
5.4.70.0070.04716.48
5.4.60.0070.04316.24
5.4.50.0070.07316.43
5.4.40.0100.06716.31
5.4.30.0070.05316.36
5.4.20.0100.07016.30
5.4.10.0000.07716.45
5.4.00.0030.06315.88
5.3.290.0030.08714.76
5.3.280.0070.06314.72
5.3.270.0030.07014.71
5.3.260.0000.07014.59
5.3.250.0070.05714.72
5.3.240.0070.06714.63
5.3.230.0070.06014.54
5.3.220.0030.06014.67
5.3.210.0030.08014.49
5.3.200.0000.07314.66
5.3.190.0070.06314.55
5.3.180.0070.07314.51
5.3.170.0070.07014.54
5.3.160.0030.07014.57
5.3.150.0170.07714.51
5.3.140.0070.07014.48
5.3.130.0030.07714.50
5.3.120.0000.08014.68
5.3.110.0000.08014.68
5.3.100.0070.06714.14
5.3.90.0030.07314.07
5.3.80.0070.06013.91
5.3.70.0030.07313.93
5.3.60.0030.07714.03
5.3.50.0000.07013.93
5.3.40.0030.06313.87
5.3.30.0100.06313.95
5.3.20.0000.07713.74
5.3.10.0070.06713.68
5.3.00.0070.07013.60
5.2.170.0030.06011.05
5.2.160.0070.05311.14
5.2.150.0000.05011.04
5.2.140.0030.06711.12
5.2.130.0070.05311.07
5.2.120.0030.06011.01
5.2.110.0130.05311.00
5.2.100.0030.06011.07
5.2.90.0030.05711.09
5.2.80.0030.06711.17
5.2.70.0000.06010.98
5.2.60.0000.06311.07
5.2.50.0030.06011.05
5.2.40.0030.05711.07
5.2.30.0030.06311.04
5.2.20.0000.05711.06
5.2.10.0030.06010.95
5.2.00.0000.05310.61
5.1.60.0070.04710.14
5.1.50.0070.05010.14
5.1.40.0070.05010.14
5.1.30.0000.05710.45
5.1.20.0030.06010.37
5.1.10.0070.05310.14
5.1.00.0030.05010.14
5.0.50.0030.04310.14
5.0.40.0030.04310.14
5.0.30.0000.05310.14
5.0.20.0000.04310.14
5.0.10.0000.03710.14
5.0.00.0030.05310.14
4.4.90.0070.02710.14
4.4.80.0000.02710.14
4.4.70.0000.03310.14
4.4.60.0030.02710.14
4.4.50.0000.02710.14
4.4.40.0030.04010.14
4.4.30.0000.03010.14
4.4.20.0000.03310.14
4.4.10.0000.02710.14
4.4.00.0030.05010.14
4.3.110.0000.03310.14
4.3.100.0000.03710.14
4.3.90.0000.02310.14
4.3.80.0030.05010.14
4.3.70.0030.03310.14
4.3.60.0070.02710.14
4.3.50.0000.03710.14
4.3.40.0030.05310.14
4.3.30.0070.02710.14
4.3.20.0030.03010.14
4.3.10.0000.03710.14
4.3.00.0000.03710.14

preferences:
37.71 ms | 401 KiB | 5 Q