3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '#\+?\(?\d+\)?\s?\d+\s?\d+#'; $x = [ '+370 655 54298', '+37065782505', '37069788505', '865782825', 'hjtgfjtdfjtgdfjt', '65782825', '(686) 51852', ]; foreach ($x as $y) { if (preg_match($regex, $y, $match)) { echo $match[0] . "\n"; } }

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.5.10.0090.01116.89
8.5.00.0150.00720.25
8.4.150.0020.00014.05
8.4.140.0120.01017.66
8.4.130.0050.00417.82
8.4.120.0040.00420.47
8.4.110.0150.00222.61
8.4.100.0120.00919.81
8.4.90.0130.00718.48
8.4.80.0080.00819.39
8.4.70.0080.01218.08
8.4.60.0140.00818.50
8.4.50.0080.00218.58
8.4.40.0180.00318.15
8.4.30.0070.01318.01
8.4.20.0130.00719.72
8.4.10.0130.00620.58
8.3.280.0110.01218.61
8.3.270.0100.01116.72
8.3.260.0130.00616.68
8.3.250.0120.00618.74
8.3.240.0160.00416.68
8.3.230.0130.00716.70
8.3.220.0060.00217.39
8.3.210.0040.00318.43
8.3.200.0050.00416.52
8.3.190.0130.00817.09
8.3.180.0110.01016.76
8.3.170.0150.00318.97
8.3.160.0040.01518.34
8.3.150.0060.01317.42
8.3.140.0000.00917.05
8.3.130.0000.00816.79
8.3.120.0060.00318.70
8.3.110.0030.00618.39
8.3.100.0150.00618.43
8.3.90.0080.00026.77
8.3.80.0060.00618.43
8.3.70.0110.00716.75
8.3.60.0120.00318.55
8.3.50.0130.00318.31
8.3.40.0070.00718.80
8.3.30.0040.01119.02
8.3.20.0000.00820.91
8.3.10.0040.00421.91
8.3.00.0040.00419.56
8.2.290.0090.00820.50
8.2.280.0130.00518.29
8.2.270.0040.01517.25
8.2.260.0140.00016.79
8.2.250.0040.00418.64
8.2.240.0040.00417.35
8.2.230.0030.00520.94
8.2.220.0000.00824.06
8.2.210.0090.00926.77
8.2.200.0030.00616.63
8.2.190.0040.01116.75
8.2.180.0090.00616.63
8.2.170.0070.00722.96
8.2.160.0110.00319.38
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0080.00019.70
8.2.120.0110.00326.35
8.2.110.0060.00322.25
8.2.100.0130.00417.79
8.2.90.0070.00517.88
8.2.80.0000.01119.88
8.2.70.0100.00017.93
8.2.60.0070.00318.03
8.2.50.0030.00619.75
8.2.40.0060.00319.25
8.2.30.0040.00421.37
8.2.20.0030.00518.15
8.2.10.0040.00418.03
8.2.00.0040.00419.21
8.1.330.0120.00622.06
8.1.320.0130.00916.41
8.1.310.0040.00418.65
8.1.300.0050.00518.46
8.1.290.0030.00618.88
8.1.280.0150.00425.92
8.1.270.0080.00022.20
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0030.00619.34
8.1.230.0040.00722.06
8.1.220.0080.00017.74
8.1.210.0040.00418.79
8.1.200.0040.00417.48
8.1.190.0050.00317.35
8.1.180.0050.00318.10
8.1.170.0040.00418.86
8.1.160.0000.00718.79
8.1.150.0060.00320.78
8.1.140.0040.00417.88
8.1.130.0000.00718.91
8.1.120.0030.00317.48
8.1.110.0050.00217.61
8.1.100.0070.00017.59
8.1.90.0000.00717.61
8.1.80.0070.00017.62
8.1.70.0000.00817.59
8.1.60.0030.00517.67
8.1.50.0040.00417.73
8.1.40.0000.00817.75
8.1.30.0040.00417.81
8.1.20.0040.00417.70
8.1.10.0000.00717.63
8.1.00.0090.00017.66
8.0.300.0000.00719.98
8.0.290.0080.00016.75
8.0.280.0030.00318.40
8.0.270.0070.00017.28
8.0.260.0000.00717.22
8.0.250.0030.00317.04
8.0.240.0000.00717.01
8.0.230.0000.00717.11
8.0.220.0040.00417.07
8.0.210.0030.00317.06
8.0.200.0000.00617.16
8.0.190.0040.00416.95
8.0.180.0080.00016.96
8.0.170.0070.00316.96
8.0.160.0000.00816.96
8.0.150.0040.00416.94
8.0.140.0050.00317.04
8.0.130.0030.00313.55
8.0.120.0030.00617.02
8.0.110.0030.00417.05
8.0.100.0040.00417.14
8.0.90.0040.00416.89
8.0.80.0070.01117.03
8.0.70.0000.00717.07
8.0.60.0050.00216.88
8.0.50.0000.00816.86
8.0.30.0090.01017.11
8.0.20.0060.01817.40
8.0.10.0040.00417.06
8.0.00.0090.00916.75
7.4.330.0000.00516.84
7.4.320.0000.00616.72
7.4.300.0060.00016.85
7.4.290.0080.00016.60
7.4.280.0030.00616.70
7.4.270.0050.00316.80
7.4.260.0000.00816.80
7.4.250.0080.00016.73
7.4.240.0000.00716.77
7.4.230.0030.00316.62
7.4.220.0050.00216.62
7.4.210.0090.00716.75
7.4.200.0040.00416.80
7.4.160.0070.00916.72
7.4.140.0080.01217.86
7.4.130.0100.00716.87
7.4.120.0110.00916.71
7.4.110.0060.01016.59
7.4.100.0060.01116.54
7.4.90.0090.00916.62
7.4.80.0150.00319.39
7.4.70.0030.01916.77
7.4.60.0100.00616.89
7.4.50.0110.00716.70
7.4.40.0150.00616.59
7.4.00.0000.01715.12
7.3.330.0050.00013.39
7.3.320.0030.00313.16
7.3.310.0070.00016.41
7.3.300.0030.00316.30
7.3.290.0030.00316.40
7.3.280.0060.01416.43
7.3.260.0130.00816.54
7.3.240.0070.01016.55
7.3.230.0090.00916.36
7.3.210.0120.01016.42
7.3.200.0120.00416.52
7.3.190.0100.01316.63
7.3.180.0090.00616.50
7.3.170.0070.01016.82
7.3.160.0030.01316.57
7.2.330.0070.01116.98
7.2.320.0090.00916.71
7.2.310.0140.00416.83
7.2.300.0100.00716.75
7.2.290.0180.00616.95
7.2.110.0170.00016.61
7.2.40.1300.01018.27
7.2.30.1180.00818.40
7.2.20.1160.01018.28
7.2.10.1360.01118.36
7.2.00.1500.01218.04
7.1.160.1220.00916.76
7.1.150.1250.00917.04
7.1.140.1290.00916.86
7.1.130.1300.01117.25
7.1.120.1780.00916.78
7.1.110.1420.01116.80
7.1.100.1020.01016.54
7.1.90.1240.01016.35
7.1.80.1190.01116.30
7.1.70.1120.00915.60
7.1.60.1850.00933.59
7.1.50.1420.01332.97
7.1.40.1290.01432.63
7.1.30.2160.00933.08
7.1.20.1480.00833.04
7.1.10.1130.00814.91
7.1.00.1210.01515.19

preferences:
39.33 ms | 403 KiB | 5 Q