3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Start Test, the data follows.<br><br>\n"; if ($fp = fopen("text.txt", "r")) { $contents = fread($fp, filesize("text.txt")); echo "$contents"; fclose($fp); } echo "\n<br><br>The data is about to be passed to preg_match(). If you do not see the word 'Success' after this line, the program has crashed.<br>\n"; $truefalsetest=preg_match('%^(?: [\x09\x0A\x0D\x20-\x7E] # ASCII | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15 | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 )*$%xs', $contents); echo "Success. Return value of preg_match() = $truefalsetest."; ?>

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.00717.00
8.3.50.0110.00722.09
8.3.40.0120.00318.82
8.3.30.0170.00319.19
8.3.20.0060.00320.38
8.3.10.0050.00323.61
8.3.00.0040.00717.71
8.2.180.0160.00618.50
8.2.170.0110.00422.96
8.2.160.0140.00020.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0080.00022.21
8.2.110.0090.00022.37
8.2.100.0120.00018.09
8.2.90.0080.00019.22
8.2.80.0000.00817.97
8.2.70.0050.00317.75
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0000.00718.04
8.2.20.0000.00717.93
8.2.10.0040.00418.04
8.2.00.0000.00817.98
8.1.280.0100.00725.92
8.1.270.0030.00522.05
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.77
8.1.230.0040.00719.00
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00717.35
8.1.190.0080.00017.41
8.1.180.0030.00618.10
8.1.170.0000.00818.78
8.1.160.0070.00021.91
8.1.150.0000.00718.65
8.1.140.0020.00517.46
8.1.130.0070.00017.86
8.1.120.0040.00417.47
8.1.110.0070.00017.62
8.1.100.0000.00717.45
8.1.90.0030.00617.52
8.1.80.0000.00717.48
8.1.70.0030.00317.51
8.1.60.0080.00017.65
8.1.50.0000.00817.54
8.1.40.0030.00617.59
8.1.30.0090.00017.62
8.1.20.0040.00417.78
8.1.10.0060.00317.63
8.1.00.0050.00317.47
8.0.300.0040.00418.77
8.0.290.0060.00317.18
8.0.280.0070.00018.45
8.0.270.0040.00417.40
8.0.260.0000.00717.23
8.0.250.0030.00317.27
8.0.240.0070.00017.32
8.0.230.0030.00317.25
8.0.220.0030.00317.17
8.0.210.0030.00317.23
8.0.200.0000.00717.30
8.0.190.0030.00617.30
8.0.180.0000.00717.21
8.0.170.0000.00717.16
8.0.160.0040.00417.23
8.0.150.0030.00517.20
8.0.140.0000.00717.16
8.0.130.0000.00613.66
8.0.120.0040.00315.46
8.0.110.0050.00115.40
8.0.100.0070.00015.42
8.0.90.0070.00215.41
8.0.80.0080.00615.41
8.0.70.0080.00215.34
8.0.60.0040.00615.32
8.0.50.0050.00515.38
8.0.30.0080.01016.00
8.0.20.0130.00416.15
8.0.10.0060.00415.40
8.0.00.0080.00615.80
7.4.330.0000.00515.01
7.4.320.0000.00616.70
7.4.300.0030.00316.66
7.4.290.0030.00316.56
7.4.280.0040.00416.73
7.4.270.0000.00716.79
7.4.260.0000.00716.76
7.4.250.0090.00114.99
7.4.240.0050.00515.68
7.4.230.0110.00015.03
7.4.220.0090.00615.02
7.4.210.0070.00715.84
7.4.200.0070.00315.04
7.4.190.0060.00415.06
7.4.180.0100.00213.42
7.4.160.0070.00715.21
7.4.150.0020.01215.47
7.4.140.0130.00216.41
7.4.130.0120.00315.67
7.4.120.0080.00715.55
7.4.110.0100.00515.14
7.4.100.0130.00215.14
7.4.90.0070.00715.10
7.4.80.0120.00616.44
7.4.70.0050.00815.04
7.4.60.0130.00315.07
7.4.50.0040.00515.07
7.4.40.0060.00818.05
7.4.30.0090.00614.96
7.4.20.0110.00013.35
7.4.10.0090.00313.34
7.4.00.0100.00614.60
7.3.330.0000.00513.44
7.3.320.0030.00313.39
7.3.310.0060.00414.90
7.3.300.0100.00014.84
7.3.290.0120.00214.91
7.3.280.0100.00715.82
7.3.270.0070.00815.39
7.3.260.0110.00414.89
7.3.250.0120.00615.44
7.3.240.0090.00815.10
7.3.230.0100.00415.07
7.3.220.0060.00613.05
7.3.210.0110.00514.82
7.3.200.0110.00516.28
7.3.190.0090.00814.83
7.3.180.0030.01014.97
7.3.170.0080.00614.89
7.3.160.0110.00414.79
7.3.150.0090.00313.25
7.3.140.0100.00313.18
7.3.130.0070.00713.14
7.3.120.0050.00814.52
7.3.110.0110.00414.17
7.3.100.0030.00814.01
7.3.90.0040.00514.24
7.3.80.0030.00614.09
7.3.70.0040.00814.30
7.3.60.0050.00614.29
7.3.50.0060.00213.99
7.3.40.0020.01014.18
7.3.30.0060.00414.20
7.3.20.0030.00515.98
7.3.10.0020.00816.00
7.3.00.0040.00615.93
7.2.340.0090.00313.26
7.2.330.0140.00515.03
7.2.320.0030.01215.08
7.2.310.0120.00215.05
7.2.300.0080.00615.16
7.2.290.0080.00815.04
7.2.280.0040.00813.45
7.2.270.0080.00413.41
7.2.260.0070.00513.46
7.2.250.0080.00614.35
7.2.240.0060.00914.35
7.2.230.0050.00814.16
7.2.220.0080.00314.21
7.2.210.0080.00514.18
7.2.200.0060.00714.38
7.2.190.0070.00614.36
7.2.180.0110.00314.21
7.2.170.0010.01214.25
7.2.160.0040.00813.63
7.2.150.0130.00015.31
7.2.140.0080.00415.41
7.2.130.0140.00015.59
7.2.120.0050.00815.30
7.2.110.0070.00715.45
7.2.100.0110.00315.38
7.2.90.0040.01015.48
7.2.80.0090.00415.37
7.2.70.0090.00615.53
7.2.60.0510.00615.39
7.2.50.0150.00015.41
7.2.40.0150.00015.32
7.2.30.0070.00715.37
7.2.20.0030.01115.36
7.2.10.0120.00515.45
7.2.00.0090.00717.53
7.1.330.0060.00915.22
7.1.320.0090.00415.11
7.1.310.0110.00415.24
7.1.300.0110.00315.01
7.1.290.0070.00515.22
7.1.280.0070.00815.17
7.1.270.0090.00415.07
7.1.260.0030.00915.10
7.1.250.0110.00214.23
7.1.240.0070.00714.37
7.1.230.0080.00414.29
7.1.220.0140.00014.17
7.1.210.0110.00414.29
7.1.200.0110.00414.43
7.1.190.0110.00214.27
7.1.180.0130.00014.09
7.1.170.0090.00514.25
7.1.160.0110.00214.22
7.1.150.0140.00014.14
7.1.140.0140.00014.18
7.1.130.0050.00914.31
7.1.120.0060.00714.30
7.1.110.0140.00014.39
7.1.100.0460.00314.38
7.1.90.0070.00714.35
7.1.80.0070.00714.32
7.1.70.0060.00515.88
7.1.60.0130.00616.90
7.1.50.0160.01015.52
7.1.40.0040.00914.32
7.1.30.0120.00214.45
7.1.20.0050.00914.41
7.1.10.0070.00714.34
7.1.00.0070.04018.46
7.0.330.0140.00014.16
7.0.320.0090.00514.28
7.0.310.0090.00514.33
7.0.300.0110.00414.14
7.0.290.0140.00014.32
7.0.280.0070.00714.30
7.0.270.0090.00514.13
7.0.260.0140.00014.15
7.0.250.0140.00014.40
7.0.240.0040.00814.34
7.0.230.0080.00414.48
7.0.220.0080.00414.26
7.0.210.0110.00014.27
7.0.200.0080.00215.52
7.0.190.0070.00514.22
7.0.180.0040.00814.41
7.0.170.0040.00814.22
7.0.160.0100.00214.21
7.0.150.0060.00614.17
7.0.140.0050.04018.11
7.0.130.0080.00414.26
7.0.120.0110.00014.27
7.0.110.0100.00314.17
7.0.100.0060.00614.11
7.0.90.0110.00013.98
7.0.80.0100.04216.91
7.0.70.0140.03616.99
7.0.60.0190.04517.10
7.0.50.0140.04217.21
7.0.40.0140.03817.09
7.0.30.0080.04217.18
7.0.20.0090.04016.99
7.0.10.0110.04217.10
7.0.00.0030.05317.07
5.6.400.0110.00012.71
5.6.390.0040.00812.52
5.6.380.0110.00012.68
5.6.370.0000.01112.55
5.6.360.0060.00612.73
5.6.350.0000.01112.67
5.6.340.0120.00012.82
5.6.330.0050.00512.51
5.6.320.0040.00712.73
5.6.310.0090.00312.89
5.6.300.0040.00712.69
5.6.290.0080.00412.52
5.6.280.0060.03616.78
5.6.270.0040.00712.80
5.6.260.0030.00712.87
5.6.250.0040.00812.53
5.6.240.0040.00712.73
5.6.230.0090.04016.62
5.6.220.0160.03316.80
5.6.210.0090.04216.65
5.6.200.0040.04517.02
5.6.190.0050.04817.00
5.6.180.0050.04916.95
5.6.170.0090.04116.86
5.6.160.0070.04416.91
5.6.150.0070.03817.02
5.6.140.0100.04016.96
5.6.130.0080.02616.88
5.6.120.0100.03716.78
5.6.110.0060.04316.93
5.6.100.0110.03816.85
5.6.90.0070.02716.74
5.6.80.0080.02316.52
5.6.70.0030.03116.65
5.6.60.0050.04016.68
5.6.50.0090.03716.61
5.6.40.0120.02216.54
5.6.30.0050.03716.60
5.6.20.0050.04516.38
5.6.10.0050.04516.55
5.6.00.0080.03916.49
5.5.380.0110.00012.78
5.5.370.0070.04216.58
5.5.360.0040.03716.43
5.5.350.0110.02016.51
5.5.340.0050.03216.71
5.5.330.0050.03816.76
5.5.320.0030.02616.67
5.5.310.0080.04316.70
5.5.300.0040.03916.61
5.5.290.0090.04316.70
5.5.280.0040.02516.62
5.5.270.0140.03016.65
5.5.260.0090.04216.67
5.5.250.0110.01816.68
5.5.240.0070.04216.45
5.5.230.0110.02816.41
5.5.220.0140.03616.52
5.5.210.0090.03516.49
5.5.200.0090.03716.36
5.5.190.0070.04016.42
5.5.180.0110.03716.47
5.5.170.0040.00712.45
5.5.160.0050.03116.35
5.5.150.0070.04216.33
5.5.140.0050.03016.26
5.5.130.0110.04016.43
5.5.120.0100.04016.13
5.5.110.0030.03116.29
5.5.100.0090.03616.32
5.5.90.0140.03216.39
5.5.80.0050.02716.30
5.5.70.0120.02516.46
5.5.60.0090.01816.43
5.5.50.0070.02216.21
5.5.40.0070.02216.36
5.5.30.0050.02316.35
5.5.20.0060.02116.35
5.5.10.0100.01716.37
5.5.00.0060.02816.24
5.4.450.0060.03915.94
5.4.440.0070.04015.96
5.4.430.0030.04316.09
5.4.420.0110.03315.81
5.4.410.0090.03915.80
5.4.400.0100.03215.76
5.4.390.0050.03215.75
5.4.380.0090.03515.82
5.4.370.0150.03515.68
5.4.360.0080.04115.73
5.4.350.0060.03015.75
5.4.340.0030.04415.84
5.4.330.0090.00212.37
5.4.320.0100.04515.76
5.4.310.0070.02915.88
5.4.300.0070.03015.91
5.4.290.0090.03615.84
5.4.280.0100.03815.85
5.4.270.0050.02715.86
5.4.260.0040.03315.73
5.4.250.0090.02615.72
5.4.240.0080.02015.91
5.4.230.0120.01615.65
5.4.220.0070.02615.59
5.4.210.0090.02215.75
5.4.200.0070.01815.64
5.4.190.0090.02515.77
5.4.180.0020.03015.72
5.4.170.0130.01915.76
5.4.160.0060.02915.75
5.4.150.0060.02115.74
5.4.140.0040.02114.50
5.4.130.0070.02814.50
5.4.120.0060.01914.49
5.4.110.0080.01814.54
5.4.100.0080.03114.50
5.4.90.0060.02114.54
5.4.80.0030.02214.46
5.4.70.0070.02214.48
5.4.60.0080.01714.48
5.4.50.0050.03314.33
5.4.40.0050.02014.50
5.4.30.0060.01814.42
5.4.20.0030.03014.48
5.4.10.0070.03214.56
5.4.00.0030.01914.22
5.3.290.0090.02713.85
5.3.280.0070.01913.72
5.3.270.0050.03913.88
5.3.260.0060.03313.91
5.3.250.0090.01913.97
5.3.240.0020.04413.89
5.3.230.0060.02113.77
5.3.220.0050.02113.59
5.3.210.0080.01813.79
5.3.200.0030.03213.61
5.3.190.0040.03313.84
5.3.180.0030.02913.71
5.3.170.0060.02013.73
5.3.160.0090.02013.87
5.3.150.0050.02013.87
5.3.140.0060.01813.88
5.3.130.0030.02213.90
5.3.120.0040.01913.73
5.3.110.0070.01713.78
5.3.100.0050.02013.60
5.3.90.0050.01713.59
5.3.80.0050.02013.42
5.3.70.0060.03113.40
5.3.60.0060.02213.55
5.3.50.0020.02013.25
5.3.40.0050.03513.33
5.3.30.0040.02013.32
5.3.20.0000.02213.19
5.3.10.0050.01813.21
5.3.00.0140.02513.23
5.2.170.0040.01712.80
5.2.160.0050.01612.83
5.2.150.0060.01212.72
5.2.140.0080.02312.65
5.2.130.0020.02412.79
5.2.120.0030.01812.67
5.2.110.0040.01612.79
5.2.100.0080.01712.80
5.2.90.0020.01712.82
5.2.80.0080.01412.72
5.2.70.0000.01812.69
5.2.60.0040.01712.75
5.2.50.0080.01212.62
5.2.40.0030.01512.68
5.2.30.0040.02012.71
5.2.20.0020.01712.58
5.2.10.0040.01512.64
5.2.00.0040.01612.56
5.1.60.0030.01312.17
5.1.50.0030.01612.29
5.1.40.0070.02312.32
5.1.30.0040.02012.38
5.1.20.0020.02012.36
5.1.10.0010.03112.20
5.1.00.0060.02212.26
5.0.50.0020.01811.95
5.0.40.0030.02011.95
5.0.30.0030.03511.95
5.0.20.0050.02211.95
5.0.10.0020.02011.95
5.0.00.0040.02011.95
4.4.90.0020.00711.95
4.4.80.0020.00811.95
4.4.70.0020.00811.95
4.4.60.0000.00811.95
4.4.50.0040.00711.95
4.4.40.0040.01011.95
4.4.30.0030.01511.95
4.4.20.0030.01711.95
4.4.10.0020.01711.95
4.4.00.0020.02811.95
4.3.110.0050.01511.95
4.3.100.0030.01711.95
4.3.90.0000.02011.95
4.3.80.0020.01411.95
4.3.70.0020.01911.95
4.3.60.0020.01811.95
4.3.50.0020.01811.95
4.3.40.0040.02311.95
4.3.30.0030.01311.95
4.3.20.0000.02011.95
4.3.10.0020.01811.95
4.3.00.0000.02011.95

preferences:
62.91 ms | 400 KiB | 5 Q