3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '/^http:\/\/([\w.]+)\/([\w]+)\/([\w]+)\.html$/i'; $str = 'http://www.youku.com/show_page/id_ABCDEFG.html'; $matches = array (); if (preg_match ( $regex, $str, $matches )) { var_dump ( $matches ); } echo "\n"; $regex = '#^http://([\w.]+)/([\w]+)/([\w]+)\.html$#i'; $str = 'http://www.youku.com/show_page/id_ABCDEFG.html'; $matches = array (); if (preg_match ( $regex, $str, $matches )) { var_dump ( $matches ); } echo "\n"; $regex = '/^[\d]{5,}$/i'; $str = '324546'; $matches = array (); if (preg_match ( $regex, $str, $matches )) { var_dump ( $matches ); } echo "\n"; if(preg_match("/php/i", "PHP is the web scripting language of choice.", $matches)){ print "A match was found:". $matches[0]; var_dump($matches); } else { print "A match was not found."; } $regex = '/HELLO/'; $str = 'hello word'; $matches = array(); if(preg_match($regex, $str, $matches)){ echo 'No i:Valid Successful!',"\n"; } if(preg_match($regex.'i', $str, $matches)){ echo 'YES i:Valid Successful!',"\n"; } $regex = '/HE(?=L)LO/i'; $str = 'HELLO'; $matches = array(); if(preg_match($regex, $str, $matches)){ var_dump($matches); } echo "\n"; $regex = '/HE(?=L)LLO/i'; $str = 'HELLO'; $matches = array(); if(preg_match($regex, $str, $matches)){ var_dump($matches); } echo "\n"; $regex = '/^(Chuanshanjia)[\w\s]+$/'; $regex2='/^(Chuanshanjia)([\w]|[\s])+$/'; $str = 'Chuanshanjia thank Chuanshanjia'; $matches = array(); if(preg_match($regex2, $str, $matches)){ var_dump($matches); } echo "\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.3.60.0150.00018.40
8.3.50.0120.00922.09
8.3.40.0040.01219.04
8.3.30.0030.01020.34
8.3.20.0080.00020.29
8.3.10.0000.00921.97
8.3.00.0050.00322.25
8.2.180.0110.00416.63
8.2.170.0090.00622.96
8.2.160.0110.00420.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00319.91
8.2.110.0030.00622.33
8.2.100.0110.00318.09
8.2.90.0050.00319.33
8.2.80.0090.00019.28
8.2.70.0000.00917.72
8.2.60.0030.00618.18
8.2.50.0060.00318.07
8.2.40.0030.00618.28
8.2.30.0050.00318.19
8.2.20.0040.00417.81
8.2.10.0030.00517.75
8.2.00.0000.01117.96
8.1.280.0040.01425.92
8.1.270.0050.00324.66
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00023.87
8.1.230.0070.00419.11
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0030.00617.60
8.1.190.0030.00517.55
8.1.180.0090.00018.96
8.1.170.0060.00318.66
8.1.160.0000.00722.23
8.1.150.0060.00318.75
8.1.140.0090.00017.64
8.1.130.0040.00417.88
8.1.120.0000.00717.66
8.1.110.0000.00817.49
8.1.100.0070.00017.61
8.1.90.0070.00017.57
8.1.80.0000.00717.50
8.1.70.0000.00817.54
8.1.60.0000.00817.73
8.1.50.0000.00817.64
8.1.40.0040.00417.54
8.1.30.0050.00317.85
8.1.20.0000.00817.74
8.1.10.0060.00317.73
8.1.00.0050.00317.59
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0050.00318.55
8.0.270.0000.00817.36
8.0.260.0030.00317.10
8.0.250.0000.00717.09
8.0.240.0060.00317.12
8.0.230.0000.00817.15
8.0.220.0000.00817.00
8.0.210.0000.00716.98
8.0.200.0000.00617.21
8.0.190.0000.00717.07
8.0.180.0080.00416.96
8.0.170.0000.00817.03
8.0.160.0040.00417.01
8.0.150.0030.00517.00
8.0.140.0040.00416.95
8.0.130.0000.00613.53
8.0.120.0020.00516.98
8.0.110.0040.00417.10
8.0.100.0050.00316.94
8.0.90.0080.00016.99
8.0.80.0040.01217.14
8.0.70.0040.00417.10
8.0.60.0000.00817.08
8.0.50.0050.00317.04
8.0.30.0130.00717.40
8.0.20.0140.00717.49
8.0.10.0080.00017.30
8.0.00.0110.01016.95
7.4.330.0000.00615.00
7.4.320.0030.00316.82
7.4.300.0030.00316.82
7.4.290.0030.00316.83
7.4.280.0000.00716.77
7.4.270.0000.00716.65
7.4.260.0000.00716.77
7.4.250.0040.00416.75
7.4.240.0070.00116.83
7.4.230.0070.00016.47
7.4.220.0150.01216.75
7.4.210.0080.00816.71
7.4.200.0000.00716.93
7.4.190.0000.00716.71
7.4.160.0040.01516.65
7.4.150.0080.01117.40
7.4.140.0110.01117.86
7.4.130.0120.00516.75
7.4.120.0090.00916.66
7.4.110.0070.01716.91
7.4.100.0080.01716.79
7.4.90.0090.01116.85
7.4.80.0030.01719.39
7.4.70.0050.01316.73
7.4.60.0150.00416.60
7.4.50.0030.00616.61
7.4.40.0070.01022.77
7.4.30.0090.00916.79
7.4.10.0090.00615.13
7.4.00.0050.01215.34
7.3.330.0000.00613.36
7.3.320.0000.00613.41
7.3.310.0040.00416.46
7.3.300.0050.00316.56
7.3.290.0040.01016.40
7.3.280.0110.00916.50
7.3.270.0140.00517.40
7.3.260.0080.01116.73
7.3.250.0140.00316.49
7.3.240.0070.01116.55
7.3.230.0080.01116.46
7.3.210.0070.01016.78
7.3.200.0120.00619.39
7.3.190.0030.01716.48
7.3.180.0100.00616.64
7.3.170.0120.00616.64
7.3.160.0110.00816.49
7.3.130.0100.00915.27
7.3.120.0110.00615.00
7.3.110.0050.01315.12
7.3.100.0070.01015.05
7.3.90.0050.00915.13
7.3.80.0020.01015.13
7.3.70.0050.00915.13
7.3.60.0030.00814.77
7.3.50.0080.00814.84
7.3.40.0040.00915.09
7.3.30.0050.00814.92
7.3.20.0080.00816.79
7.3.10.0070.00716.92
7.3.00.0060.00616.84
7.2.330.0040.01516.77
7.2.320.0040.01716.90
7.2.310.0090.00916.70
7.2.300.0130.00316.84
7.2.290.0060.01216.90
7.2.260.0070.01414.91
7.2.250.0070.01215.26
7.2.240.0050.01215.05
7.2.230.0050.01015.15
7.2.220.0070.00715.33
7.2.210.0020.01015.13
7.2.200.0020.01415.21
7.2.190.0090.00815.27
7.2.180.0090.00515.31
7.2.170.0070.00815.31
7.2.160.0060.00715.25
7.2.150.0050.01317.14
7.2.140.0060.00917.03
7.2.130.0070.00617.10
7.2.120.0070.00717.03
7.2.110.0050.00917.03
7.2.100.0040.00817.06
7.2.90.0030.01217.10
7.2.80.0070.00617.04
7.2.70.0100.00717.01
7.2.60.0030.01016.90
7.2.50.0050.00617.11
7.2.40.0050.00616.87
7.2.30.0080.00717.06
7.2.20.0050.01117.13
7.2.10.0090.00617.10
7.2.00.0040.01017.79
7.1.330.0050.01116.12
7.1.320.0070.00915.68
7.1.310.0100.00516.02
7.1.300.0030.01215.90
7.1.290.0080.00716.16
7.1.280.0030.01216.05
7.1.270.0070.00815.97
7.1.260.0050.00816.17
7.1.250.0040.00816.05
7.1.240.0090.00615.81
7.1.230.0100.00715.99
7.1.220.0060.00615.95
7.1.210.0040.00515.97
7.1.200.0050.01015.96
7.1.190.0050.00915.95
7.1.180.0060.00615.93
7.1.170.0070.00616.01
7.1.160.0080.00316.00
7.1.150.0090.00615.76
7.1.140.0070.00715.86
7.1.130.0050.01015.90
7.1.120.0040.01215.97
7.1.110.0030.01115.94
7.1.100.0070.00916.74
7.1.90.0050.00616.02
7.1.80.0050.00816.05
7.1.70.0040.01016.56
7.1.60.0070.01017.05
7.1.50.0090.00416.45
7.1.40.0080.00616.07
7.1.30.0050.00916.07
7.1.20.0060.00915.82
7.1.10.0050.00915.98
7.1.00.0030.02118.13
7.0.330.0040.00915.58
7.0.320.0050.00915.63
7.0.310.0030.01215.50
7.0.300.0020.00915.69
7.0.290.0050.00815.60
7.0.280.0060.00615.54
7.0.270.0030.01115.54
7.0.260.0030.01115.65
7.0.250.0060.01015.78
7.0.240.0020.01015.48
7.0.230.0090.00315.60
7.0.220.0060.00315.61
7.0.210.0060.01015.71
7.0.200.0060.00616.21
7.0.190.0040.00715.67
7.0.180.0060.00815.47
7.0.170.0020.01115.63
7.0.160.0070.00715.61
7.0.150.0050.01015.61
7.0.140.0070.02717.60
7.0.130.0030.01015.56
7.0.120.0080.00615.75
7.0.110.0090.00915.40
7.0.100.0100.02916.96
7.0.90.0100.02816.95
7.0.80.0030.02317.16
7.0.70.0080.01917.08
7.0.60.0080.01717.02
7.0.50.0070.03117.29
7.0.40.0100.02415.83
7.0.30.0090.03315.71
7.0.20.0050.02615.82
7.0.10.0060.02515.76
7.0.00.0040.03415.74
5.6.400.0030.01014.45
5.6.390.0050.00914.44
5.6.380.0060.00514.55
5.6.370.0060.00614.55
5.6.360.0050.00814.67
5.6.350.0060.00614.36
5.6.340.0090.00614.63
5.6.330.0050.01014.52
5.6.320.0060.00514.44
5.6.310.0060.00814.61
5.6.300.0020.01114.44
5.6.290.0070.00714.38
5.6.280.0010.03216.55
5.6.270.0020.01114.53
5.6.260.0090.00714.42
5.6.250.0040.02116.65
5.6.240.0000.02816.41
5.6.230.0030.02216.55
5.6.220.0090.02416.49
5.6.210.0060.02616.40
5.6.200.0040.02316.70
5.6.190.0070.03816.67
5.6.180.0040.02516.71
5.6.170.0090.01816.68
5.6.160.0050.02316.60
5.6.150.0040.03216.60
5.6.140.0070.02916.65
5.6.130.0100.03016.68
5.6.120.0030.02516.67
5.6.110.0100.03416.69
5.6.100.0070.01916.66
5.6.90.0040.02116.63
5.6.80.0100.02516.34
5.6.70.0050.02016.53
5.6.60.0050.02016.27
5.6.50.0040.03516.36
5.6.40.0070.03116.47
5.6.30.0100.01916.41
5.6.20.0070.03416.38
5.6.10.0070.01816.42
5.6.00.0060.02116.38
5.5.380.0050.03016.39
5.5.370.0060.02716.59
5.5.360.0100.02616.37
5.5.350.0040.02916.43
5.5.340.0030.03516.50
5.5.330.0020.02216.63
5.5.320.0090.02416.68
5.5.310.0070.03216.40
5.5.300.0090.02016.65
5.5.290.0100.01616.51
5.5.280.0070.01816.49
5.5.270.0060.02916.49
5.5.260.0030.02716.52
5.5.250.0080.02516.35
5.5.240.0050.02416.38
5.5.230.0030.02316.37
5.5.220.0040.02816.39
5.5.210.0040.03616.14
5.5.200.0080.02816.27
5.5.190.0050.02116.33
5.5.180.0060.02216.32
5.5.170.0060.00714.47
5.5.160.0110.02016.41
5.5.150.0040.01816.22
5.5.140.0090.02916.30
5.5.130.0080.01816.16
5.5.120.0090.01716.40
5.5.110.0060.03016.28
5.5.100.0050.02116.25
5.5.90.0060.03416.11
5.5.80.0070.03116.27
5.5.70.0100.01616.25
5.5.60.0050.03116.05
5.5.50.0130.02516.26
5.5.40.0130.01216.37
5.5.30.0060.02016.20
5.5.20.0020.03516.26
5.5.10.0080.02816.10
5.5.00.0030.03616.20
5.4.450.0040.02014.04
5.4.440.0020.02714.08
5.4.430.0030.01914.17
5.4.420.0020.02714.15
5.4.410.0050.01614.00
5.4.400.0080.02913.99
5.4.390.0030.02513.95
5.4.380.0090.01513.89
5.4.370.0030.02413.93
5.4.360.0050.01913.96
5.4.350.0090.01513.93
5.4.340.0060.02314.01
5.4.330.0050.00711.44
5.4.320.0020.01813.95
5.4.310.0070.02313.90
5.4.300.0010.02014.00
5.4.290.0070.02313.95
5.4.280.0030.02413.99
5.4.270.0040.02313.95
5.4.260.0060.02513.97
5.4.250.0030.02013.93
5.4.240.0080.02713.97
5.4.230.0010.02014.01
5.4.220.0010.03114.01
5.4.210.0030.02213.93
5.4.200.0040.03013.96
5.4.190.0080.01414.02
5.4.180.0040.03113.90
5.4.170.0030.02113.98
5.4.160.0060.02814.00
5.4.150.0060.01413.97
5.4.140.0020.03013.15
5.4.130.0050.01313.07
5.4.120.0070.01813.08
5.4.110.0050.02813.13
5.4.100.0050.03013.09
5.4.90.0070.02513.12
5.4.80.0050.02113.09
5.4.70.0050.01813.12
5.4.60.0040.03013.11
5.4.50.0070.02513.06
5.4.40.0040.02713.11
5.4.30.0030.01713.06
5.4.20.0060.02413.11
5.4.10.0050.02413.06
5.4.00.0050.01612.87
5.3.290.0030.02912.52
5.3.280.0050.02612.50
5.3.270.0040.01812.50
5.3.260.0070.02812.49
5.3.250.0020.03212.49
5.3.240.0050.02812.48
5.3.230.0060.02712.46
5.3.220.0050.02912.44
5.3.210.0080.02812.48
5.3.200.0010.02112.49
5.3.190.0020.03212.46
5.3.180.0060.02512.48
5.3.170.0030.02112.48
5.3.160.0060.02612.48
5.3.150.0040.02312.50
5.3.140.0040.02812.47
5.3.130.0100.02412.44
5.3.120.0050.02212.49
5.3.110.0060.02212.48
5.3.100.0030.02912.31
5.3.90.0040.02112.26
5.3.80.0070.03212.28
5.3.70.0060.02612.26
5.3.60.0030.02712.29
5.3.50.0050.02312.28
5.3.40.0060.01412.24
5.3.30.0030.02812.26
5.3.20.0020.02012.13
5.3.10.0020.02812.16
5.3.00.0030.02412.18
5.2.170.0030.04011.17
5.2.160.0000.03311.01
5.2.150.0070.06311.01
5.2.140.0070.05711.01
5.2.130.0030.04310.92
5.2.120.0030.03011.09
5.2.110.0130.06011.09
5.2.100.0130.05011.13
5.2.90.0070.05311.16
5.2.80.0000.05311.11
5.2.70.0130.05311.20
5.2.60.0100.03711.04
5.2.50.0070.05711.04
5.2.40.0030.03010.89
5.2.30.0030.05711.05
5.2.20.0130.02311.03
5.2.10.0030.04310.84
5.2.00.0130.02310.84
5.1.60.0070.04010.84
5.1.50.0070.03010.84
5.1.40.0100.02310.84
5.1.30.0030.02710.84
5.1.20.0000.04310.84
5.1.10.0000.03310.84
5.1.00.0000.02710.84
5.0.50.0030.03310.84
5.0.40.0070.02010.84
5.0.30.0030.07010.84
5.0.20.0070.04010.84
5.0.10.0070.04710.84
5.0.00.0000.05010.84
4.4.90.0000.01710.84
4.4.80.0070.01310.84
4.4.70.0070.03010.84
4.4.60.0030.02310.84
4.4.50.0070.03010.84
4.4.40.0000.03310.84
4.4.30.0000.01710.84
4.4.20.0100.01010.84
4.4.10.0070.01010.84
4.4.00.0000.04310.84
4.3.110.0070.01310.84
4.3.100.0030.01710.84
4.3.90.0030.03310.84
4.3.80.0070.05010.84
4.3.70.0030.02710.84
4.3.60.0030.03310.84
4.3.50.0030.02710.84
4.3.40.0000.05310.84
4.3.30.0000.03710.84
4.3.20.0030.03010.84
4.3.10.0000.01710.84
4.3.00.0000.03310.84

preferences:
35.75 ms | 401 KiB | 5 Q