3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isUrl($text) { $regex = array(); $regex["url"] = '/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/i'; $mat = array(); echo $regex["url"]; preg_match_all($regex["url"], $text, $mat); var_dump($mat); if ($mat[0]) { echo $mat[0]; } } isUrl("来戳这里!http://aaa.bb.cc sdfsafsdhttp://aa.bb.com");

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.0070.00716.63
8.3.50.0090.00922.91
8.3.40.0070.00718.98
8.3.30.0100.00319.14
8.3.20.0030.00620.33
8.3.10.0050.00320.84
8.3.00.0060.00317.63
8.2.180.0000.01518.41
8.2.170.0110.00422.96
8.2.160.0070.01020.57
8.2.150.0070.00025.66
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00019.66
8.2.110.0030.00620.97
8.2.100.0040.00717.91
8.2.90.0100.00019.89
8.2.80.0050.00319.30
8.2.70.0060.00317.75
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0030.00518.22
8.2.30.0000.00718.02
8.2.20.0000.00817.94
8.2.10.0040.00418.07
8.2.00.0050.00317.87
8.1.280.0110.00425.92
8.1.270.0090.00020.69
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0070.00322.66
8.1.230.0060.00620.91
8.1.220.0030.00517.79
8.1.210.0050.00318.77
8.1.200.0000.00917.22
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0040.00418.91
8.1.160.0040.00418.83
8.1.150.0030.00718.84
8.1.140.0020.00517.30
8.1.130.0000.00717.87
8.1.120.0040.00417.38
8.1.110.0000.00817.42
8.1.100.0050.00217.42
8.1.90.0040.00417.42
8.1.80.0040.00417.44
8.1.70.0030.00317.36
8.1.60.0000.00817.54
8.1.50.0080.00017.59
8.1.40.0080.00617.50
8.1.30.0040.00417.60
8.1.20.0050.00317.66
8.1.10.0040.00417.58
8.1.00.0100.00017.56
8.0.300.0040.00420.04
8.0.290.0090.00016.75
8.0.280.0030.00518.50
8.0.270.0000.00717.24
8.0.260.0030.00317.31
8.0.250.0030.00317.07
8.0.240.0030.00317.07
8.0.230.0050.00316.95
8.0.220.0020.00516.82
8.0.210.0030.00316.78
8.0.200.0030.00316.98
8.0.190.0000.00816.97
8.0.180.0040.00416.92
8.0.170.0000.00716.97
8.0.160.0040.00416.84
8.0.150.0000.00716.79
8.0.140.0000.00716.89
8.0.130.0030.00613.29
8.0.120.0040.00416.77
8.0.110.0000.00716.90
8.0.100.0040.00416.89
8.0.90.0030.00516.68
8.0.80.0090.00716.89
8.0.70.0000.00716.89
8.0.60.0040.00416.80
8.0.50.0040.00416.96
8.0.30.0070.01117.17
8.0.20.0080.01017.40
8.0.10.0070.00016.97
8.0.00.0100.00916.84
7.4.330.0050.00015.02
7.4.320.0060.00016.42
7.4.300.0030.00616.57
7.4.290.0070.00316.60
7.4.280.0000.00716.53
7.4.270.0000.00716.70
7.4.260.0040.00416.53
7.4.250.0040.00416.66
7.4.240.0040.00316.62
7.4.230.0070.00016.61
7.4.220.0140.00416.52
7.4.210.0090.00616.65
7.4.200.0080.00016.65
7.4.160.0070.01016.52
7.4.150.0180.00017.40
7.4.140.0100.00817.86
7.4.130.0160.00916.48
7.4.120.0100.00716.49
7.4.110.0070.01016.48
7.4.100.0090.00916.66
7.4.90.0080.01316.49
7.4.80.0120.00616.44
7.4.70.0060.01216.57
7.4.60.0090.00616.66
7.4.50.0080.00016.78
7.4.40.0120.00616.52
7.4.30.0130.00416.73
7.4.00.0000.01415.32
7.3.330.0030.00313.37
7.3.320.0050.00013.31
7.3.310.0030.00316.34
7.3.300.0070.00016.42
7.3.290.0080.00816.45
7.3.280.0100.00716.44
7.3.270.0120.00617.40
7.3.260.0100.01416.25
7.3.240.0030.01316.42
7.3.230.0080.00816.66
7.3.210.0030.01416.75
7.3.200.0080.01419.39
7.3.190.0100.01016.67
7.3.180.0130.00316.47
7.3.170.0110.00516.54
7.3.160.0090.01216.67
7.3.10.0040.00916.83
7.3.00.0060.00616.89
7.2.330.0050.01417.01
7.2.320.0060.01216.87
7.2.310.0180.00016.95
7.2.300.0060.01216.63
7.2.290.0060.01616.68
7.2.130.0120.00617.14
7.2.120.0150.01117.03
7.2.110.0060.00616.91
7.2.100.0070.01017.12
7.2.90.0070.00717.06
7.2.80.0070.01517.12
7.2.70.0090.00617.00
7.2.60.0120.01017.11
7.2.50.0070.01117.15
7.2.40.0120.00316.71
7.2.30.0090.00616.87
7.2.20.0030.00916.86
7.2.10.0000.01317.13
7.2.00.0050.01218.39
7.1.250.0260.00015.94
7.1.100.0040.00818.55
7.1.70.0000.00717.49
7.1.60.0070.01719.34
7.1.50.0070.01716.90
7.1.00.0100.07022.36
7.0.200.0060.01017.05
7.0.140.0070.06722.18
7.0.60.0070.03719.96
7.0.50.0000.05717.91
7.0.40.0070.07320.05
7.0.30.0170.04020.24
7.0.20.0270.08720.09
7.0.10.0100.08720.18
7.0.00.0070.07020.18
5.6.280.0030.07321.10
5.6.210.0070.06020.77
5.6.200.0030.04018.25
5.6.190.0130.08020.39
5.6.180.0270.04720.34
5.6.170.0270.04720.62
5.6.160.0130.08020.48
5.6.150.0030.08718.30
5.6.140.0100.06318.18
5.6.130.0030.04018.14
5.6.120.0070.09020.98
5.6.110.0030.05721.12
5.6.100.0100.08021.06
5.6.90.0100.06020.98
5.6.80.0270.06320.37
5.5.350.0030.08020.39
5.5.340.0030.08717.98
5.5.330.0030.08720.27
5.5.320.1630.06320.36
5.5.310.0270.05320.22
5.5.300.0070.05717.94
5.5.290.0070.07717.98
5.5.280.0130.08020.97
5.5.270.0000.05020.75
5.5.260.0100.07020.95
5.5.250.0070.05320.61
5.5.240.0000.04320.16
5.4.450.0570.05719.57
5.4.440.0400.06019.47
5.4.430.0400.04319.40
5.4.420.0830.03319.36
5.4.410.0470.04319.19
5.4.400.0530.04318.95
5.4.390.0600.05318.84
5.4.380.0470.03319.16
5.4.370.0430.03719.00
5.4.360.0530.04719.22
5.4.350.0570.03318.95
5.4.340.0970.03319.04
5.4.320.0600.04319.18
5.4.310.0330.05019.13
5.4.300.0470.03718.98
5.4.290.0630.03719.19
5.4.280.0330.05018.94
5.4.270.0470.03719.13
5.4.260.0430.04319.23
5.4.250.0630.03719.05
5.4.240.0570.04318.85
5.4.230.0570.03319.13
5.4.220.0470.03719.16
5.4.210.0270.05019.30
5.4.200.0370.04019.05
5.4.190.0470.04318.99
5.4.180.0200.04719.13
5.4.170.0530.04019.31
5.4.160.0800.03719.20
5.4.150.0430.04319.19
5.4.140.0270.04316.55
5.4.130.0570.04016.37
5.4.120.0330.04316.54
5.4.110.0870.03016.43
5.4.100.0700.03716.59
5.4.90.0070.02316.57
5.4.80.0700.03016.57
5.4.70.0500.04016.47
5.4.60.0500.04016.35
5.4.50.0670.03716.16
5.4.40.0670.03716.55
5.4.30.0630.04016.51
5.4.20.0270.03016.17
5.4.10.0330.03016.51
5.4.00.0430.05015.75
5.3.290.0400.04315.20
5.3.280.0630.02715.20
5.3.270.0630.02315.20
5.3.260.0330.03715.20
5.3.250.0500.04015.20
5.3.240.0530.05315.20
5.3.230.0600.03015.20
5.3.220.0600.03015.20
5.3.210.0370.04715.20
5.3.200.0430.02715.20
5.3.190.0900.03015.20
5.3.180.0500.03715.20
5.3.170.0500.04315.20
5.3.160.0570.05015.20
5.3.150.0500.03715.20
5.3.140.0600.03715.20
5.3.130.0700.05315.20
5.3.120.0070.04715.20
5.3.110.0300.05015.19
5.3.100.0500.03715.19
5.3.90.0670.04015.19
5.3.80.0430.04015.19
5.3.70.0370.03315.19
5.3.60.0570.03715.19
5.3.50.0330.03715.19
5.3.40.0430.03315.19
5.3.30.0630.03315.19
5.3.20.0730.03715.19
5.3.10.0770.03315.19
5.3.00.0400.04315.19
5.2.170.0600.03015.19
5.2.160.0500.03015.19
5.2.150.0600.02315.19
5.2.140.0000.02715.19
5.2.130.0130.06315.19
5.2.120.0400.03015.19
5.2.110.0430.03015.19
5.2.100.0930.04015.19
5.2.90.0470.02315.19
5.2.80.0530.03015.19
5.2.70.0430.03715.19
5.2.60.0430.03015.19
5.2.50.0570.02315.19
5.2.40.0000.03015.19
5.2.30.0570.02315.19
5.2.20.0770.02015.19
5.2.10.0400.04015.19
5.2.00.0500.02315.19
5.1.60.0170.02015.19
5.1.50.0470.03315.19
5.1.40.0230.01715.19
5.1.30.0500.05715.19
5.1.20.0400.02715.19
5.1.10.0270.02315.19
5.1.00.0230.02715.19
5.0.50.0130.02015.19
5.0.40.0170.02315.19
5.0.30.0170.02315.19
5.0.20.0030.01715.19
5.0.10.0200.02315.19
5.0.00.0170.03015.19
4.4.90.0070.01715.19
4.4.80.0130.01715.19
4.4.70.0130.01015.19
4.4.60.0070.01315.19
4.4.50.0200.01715.19
4.4.40.0230.03015.19
4.4.30.0130.01715.19
4.4.20.0230.01315.19
4.4.10.0170.02015.19
4.4.00.0130.02015.19
4.3.110.0270.01315.19
4.3.100.0130.01715.19
4.3.90.0200.01715.19
4.3.80.0270.01715.19
4.3.70.0330.01315.19
4.3.60.0170.01315.19
4.3.50.0230.01315.19
4.3.40.0070.01315.19
4.3.30.0100.01315.19
4.3.20.0000.02015.19
4.3.10.0030.01715.19
4.3.00.0100.01315.19

preferences:
33.69 ms | 401 KiB | 5 Q