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($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.0040.01116.88
8.3.50.0070.01018.39
8.3.40.0110.00419.04
8.3.30.0030.01019.04
8.3.20.0080.00020.39
8.3.10.0040.00420.48
8.3.00.0100.00017.71
8.2.180.0150.00618.38
8.2.170.0100.01022.96
8.2.160.0000.01420.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.92
8.2.110.0090.00022.25
8.2.100.0080.00417.91
8.2.90.0000.00817.97
8.2.80.0060.00318.95
8.2.70.0030.00617.63
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0080.00018.03
8.2.30.0070.00018.04
8.2.20.0040.00417.76
8.2.10.0060.00317.94
8.2.00.0040.00417.93
8.1.280.0070.01125.92
8.1.270.0080.00020.48
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00922.63
8.1.230.0040.00720.94
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0050.00317.50
8.1.180.0000.00818.10
8.1.170.0070.00018.75
8.1.160.0040.00418.80
8.1.150.0000.01018.87
8.1.140.0050.00217.44
8.1.130.0050.00317.81
8.1.120.0040.00417.43
8.1.110.0040.00417.38
8.1.100.0070.00017.42
8.1.90.0030.00317.29
8.1.80.0070.00017.44
8.1.70.0030.00317.39
8.1.60.0000.00817.57
8.1.50.0050.00317.43
8.1.40.0060.00317.40
8.1.30.0040.00417.60
8.1.20.0000.00717.64
8.1.10.0000.00817.51
8.1.00.0040.00817.49
8.0.300.0030.00320.04
8.0.290.0050.00316.75
8.0.280.0000.00718.36
8.0.270.0030.00317.33
8.0.260.0050.00217.32
8.0.250.0070.00016.96
8.0.240.0030.00317.06
8.0.230.0000.00716.98
8.0.220.0020.00516.84
8.0.210.0030.00316.81
8.0.200.0070.00016.95
8.0.190.0040.00416.96
8.0.180.0050.00216.93
8.0.170.0000.00716.93
8.0.160.0000.00716.79
8.0.150.0000.00716.80
8.0.140.0040.00416.87
8.0.130.0050.00513.25
8.0.120.0040.00416.77
8.0.110.0070.00016.84
8.0.100.0050.00516.80
8.0.90.0000.00716.89
8.0.80.0060.00916.94
8.0.70.0040.00416.92
8.0.60.0040.00416.79
8.0.50.0050.00216.73
8.0.30.0120.01017.06
8.0.20.0120.00617.40
8.0.10.0000.00817.05
8.0.00.0100.00816.91
7.4.330.0000.00615.02
7.4.320.0000.00616.44
7.4.300.0080.00016.72
7.4.290.0000.01116.66
7.4.280.0040.00416.58
7.4.270.0030.00316.44
7.4.260.0000.00716.64
7.4.250.0080.00016.56
7.4.240.0000.00716.65
7.4.230.0070.00016.79
7.4.220.0040.01416.70
7.4.210.0070.00716.60
7.4.200.0000.00716.43
7.4.160.0060.01116.45
7.4.150.0170.00017.40
7.4.140.0100.00817.86
7.4.130.0090.01316.63
7.4.120.0130.00416.65
7.4.110.0110.00716.61
7.4.100.0090.00916.56
7.4.90.0100.00716.54
7.4.80.0090.00916.50
7.4.70.0080.00816.46
7.4.60.0060.01116.60
7.4.50.0030.00616.57
7.4.40.0120.01016.76
7.4.30.0060.01116.51
7.4.00.0070.00715.16
7.3.330.0070.00013.40
7.3.320.0060.00013.31
7.3.310.0020.00516.54
7.3.300.0030.00316.43
7.3.290.0030.01216.44
7.3.280.0090.00916.45
7.3.270.0080.01217.40
7.3.260.0080.00816.63
7.3.240.0100.01016.45
7.3.230.0130.00516.39
7.3.210.0110.01116.69
7.3.200.0130.00919.39
7.3.190.0150.00316.29
7.3.180.0070.01016.46
7.3.170.0040.01216.80
7.3.160.0040.01116.44
7.3.00.0000.01516.73
7.2.330.0060.01216.97
7.2.320.0090.00916.73
7.2.310.0070.01416.83
7.2.300.0130.01016.68
7.2.290.0130.01016.68
7.2.130.0070.00717.13
7.2.120.0070.00317.21
7.2.110.0000.01416.80
7.2.100.0090.00317.21
7.2.90.0130.00617.31
7.2.80.0150.00416.94
7.2.70.0070.00716.87
7.2.60.0020.01116.95
7.2.50.0040.01217.16
7.2.40.0120.00017.02
7.2.30.0140.00417.10
7.2.20.0100.00317.10
7.2.10.0100.00616.80
7.2.00.0040.00618.29
7.1.250.0070.00316.18
7.1.240.0100.00315.66
7.1.230.0040.00816.02
7.1.220.0110.00816.04
7.1.210.0030.01115.72
7.1.200.0070.00515.90
7.1.190.0150.00315.64
7.1.180.0040.01115.75
7.1.170.0140.00415.76
7.1.160.0040.00815.67
7.1.150.0080.00416.02
7.1.140.0230.00616.13
7.1.130.0120.00415.99
7.1.120.0180.00016.11
7.1.110.0100.00616.08
7.1.100.0070.00816.91
7.1.90.0090.00916.18
7.1.80.0030.01016.00
7.1.70.0050.00516.70
7.1.60.0050.01617.60
7.1.50.0130.00816.57
7.1.40.0120.00615.90
7.1.30.0080.00215.67
7.1.20.0100.00715.95
7.1.10.0070.00415.81
7.1.00.0060.04119.23
7.0.330.0040.01115.27
7.0.320.0100.00715.54
7.0.310.0030.00615.46
7.0.300.0080.00014.99
7.0.290.0100.00715.45
7.0.280.0060.00915.31
7.0.270.0000.01015.51
7.0.260.0030.01015.31
7.0.250.0070.00715.76
7.0.240.0110.00315.64
7.0.230.0060.00315.52
7.0.220.0140.00015.54
7.0.210.0050.00915.60
7.0.200.0070.00616.32
7.0.190.0090.00515.26
7.0.180.0070.00715.57
7.0.170.0100.00315.53
7.0.160.0080.00415.57
7.0.150.0040.00815.38
7.0.140.0090.03618.88
7.0.130.0000.00815.42
7.0.120.0030.00915.52
7.0.110.0050.00815.56
7.0.100.0000.01115.36
7.0.90.0030.00715.54
7.0.80.0040.00415.48
7.0.70.0060.00615.52
7.0.60.0070.03017.76
7.0.50.0100.04216.85
7.0.40.0040.04816.82
7.0.30.0080.02816.81
7.0.20.0120.03116.84
7.0.10.0090.04316.80
7.0.00.0060.04516.78
5.6.380.0030.01014.45
5.6.370.0090.00914.48
5.6.360.0000.01814.02
5.6.350.0070.00714.37
5.6.340.0000.01214.35
5.6.330.0070.00414.62
5.6.320.0070.00314.54
5.6.310.0080.00314.66
5.6.300.0060.00614.57
5.6.290.0100.00314.29
5.6.280.0040.03817.64
5.6.270.0060.00614.34
5.6.260.0080.00414.32
5.6.250.0030.00914.81
5.6.240.0070.00314.13
5.6.230.0070.00714.26
5.6.220.0030.00714.28
5.6.210.0140.03117.53
5.6.200.0090.02716.36
5.6.190.0020.03617.60
5.6.180.0300.03117.57
5.6.170.0180.02217.50
5.6.160.0090.04617.44
5.6.150.0070.04516.31
5.6.140.0040.02216.48
5.6.130.0020.02916.21
5.6.120.0080.02317.77
5.6.110.0050.04517.64
5.6.100.0150.03817.67
5.6.90.0100.04117.59
5.6.80.0050.05017.26
5.6.70.0030.01014.30
5.6.60.0060.00314.30
5.6.50.0030.01414.34
5.6.40.0030.01014.42
5.6.30.0060.00613.84
5.6.20.0040.01114.58
5.6.10.0070.01014.37
5.6.00.0040.00414.55
5.5.380.0000.01011.36
5.5.370.0060.00311.27
5.5.360.0080.00010.99
5.5.350.0170.03915.79
5.5.340.0080.04114.73
5.5.330.0060.04515.89
5.5.320.0130.04115.75
5.5.310.0150.03015.63
5.5.300.0070.04014.67
5.5.290.0070.03214.55
5.5.280.0080.02816.03
5.5.270.0070.03916.06
5.5.260.0100.03816.13
5.5.250.0080.04015.87
5.5.240.0050.03915.71
5.5.230.0040.00810.90
5.5.220.0030.01210.90
5.5.210.0030.00810.90
5.5.200.0030.00711.31
5.5.190.0060.00311.29
5.5.180.0060.00611.36
5.5.170.0030.01011.34
5.5.160.0040.00711.16
5.5.150.0000.01111.18
5.5.140.0030.00710.90
5.5.130.0050.00511.01
5.5.120.0030.00611.09
5.5.110.0070.00410.99
5.5.100.0100.00311.42
5.5.90.0060.00611.31
5.5.80.0110.00011.30
5.5.70.0000.01311.12
5.5.60.0000.00711.17
5.5.50.0030.00711.27
5.5.40.0090.00611.09
5.5.30.0070.00311.21
5.5.20.0050.00511.24
5.5.10.0000.01011.13
5.5.00.0070.00410.90
5.4.450.0230.02715.28
5.4.440.0170.02715.32
5.4.430.0280.02415.37
5.4.420.0240.02715.03
5.4.410.0280.01915.05
5.4.400.0260.02315.13
5.4.390.0470.02515.22
5.4.380.0120.02214.90
5.4.370.0250.02214.95
5.4.360.0260.02115.01
5.4.350.0390.02415.18
5.4.340.0270.02415.03
5.4.330.0110.00210.94
5.4.320.0340.02615.06
5.4.310.0310.02314.95
5.4.300.0390.02315.10
5.4.290.0430.02014.93
5.4.280.0330.02515.08
5.4.270.0130.02215.14
5.4.260.0350.02415.12
5.4.250.0260.02015.18
5.4.240.0240.02115.20
5.4.230.0270.02415.16
5.4.220.0330.02215.16
5.4.210.0250.02215.12
5.4.200.0250.02315.05
5.4.190.0440.02415.04
5.4.180.0280.02515.23
5.4.170.0570.02015.08
5.4.160.0420.02515.23
5.4.150.0160.02615.05
5.4.140.0420.01713.84
5.4.130.0400.02513.71
5.4.120.0160.02413.87
5.4.110.0350.02413.76
5.4.100.0550.03313.80
5.4.90.0340.01813.90
5.4.80.0460.02813.90
5.4.70.0280.02413.68
5.4.60.0210.03513.94
5.4.50.0270.02713.91
5.4.40.0320.02413.88
5.4.30.0070.01713.66
5.4.20.0470.01513.85
5.4.10.0430.02513.80
5.4.00.0370.02613.68
5.3.290.0330.02214.44
5.3.280.0410.02114.03
5.3.270.0370.02013.94
5.3.260.0240.02213.81
5.3.250.0360.03613.71
5.3.240.0140.02313.71
5.3.230.0430.02413.71
5.3.220.0170.02313.70
5.3.210.0360.02513.70
5.3.200.0370.02613.70
5.3.190.1100.02812.78
5.3.180.0260.02213.59
5.3.170.0280.02113.58
5.3.160.0550.02313.58
5.3.150.0270.03913.58
5.3.140.0310.03013.58
5.3.130.0250.03313.58
5.3.120.0560.01913.58
5.3.110.0310.02213.58
5.3.100.0450.01913.58
5.3.90.0560.02913.58
5.3.80.0350.02413.58
5.3.70.0200.02813.58
5.3.60.0430.01813.58
5.3.50.0450.02813.57
5.3.40.0450.02213.57
5.3.30.0430.01913.57
5.3.20.0220.01913.57
5.3.10.0390.02213.57
5.3.00.0450.03213.57
5.2.170.0230.02213.57
5.2.160.0380.01813.57
5.2.150.0410.01613.57
5.2.140.0270.03213.57
5.2.130.0120.04113.57
5.2.120.0270.02013.57
5.2.110.0180.03113.57
5.2.100.0470.02713.57
5.2.90.0010.01613.57
5.2.80.0000.02013.57
5.2.70.0430.01413.57
5.2.60.0470.02513.57
5.2.50.0210.02013.57
5.2.40.0260.01813.57
5.2.30.0340.01613.57
5.2.20.0130.01413.57
5.2.10.0240.01613.57
5.2.00.0190.01713.57
5.1.60.0180.01513.57
5.1.50.0070.01513.57
5.1.40.0160.01613.57
5.1.30.0020.01513.57
5.1.20.0180.01713.57
5.1.10.0380.01313.57
5.1.00.0190.01513.57
5.0.50.0130.01313.57
5.0.40.0000.01613.57
5.0.30.0120.01713.57
5.0.20.0100.01413.57
5.0.10.0100.01513.57
5.0.00.0150.01313.57
4.4.90.0030.01313.57
4.4.80.0190.00713.57
4.4.70.0150.01013.57
4.4.60.0070.00713.57
4.4.50.0200.01013.57
4.4.40.0170.01213.57
4.4.30.0080.01013.57
4.4.20.0120.01413.57
4.4.10.0100.01513.57
4.4.00.0200.01013.57
4.3.110.0050.01013.57
4.3.100.0190.00713.57
4.3.90.0050.01113.57
4.3.80.0050.01513.57
4.3.70.0070.00913.57
4.3.60.0070.01213.57
4.3.50.0090.00913.57
4.3.40.0130.00813.57
4.3.30.0060.00713.57
4.3.20.0120.01013.57
4.3.10.0010.01113.57
4.3.00.0030.01013.57

preferences:
50.32 ms | 400 KiB | 5 Q