3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * This should produce failures when using a version of libpcre older than 8.32 */ // Ignore versions other than 5.3-5.5 if (!preg_match('/^5\.[345]\./', phpversion())) { print "Don't care about this version\n"; exit(0); } error_reporting(E_ALL); ob_start(); phpinfo(); $phpinfo = ob_get_clean(); print preg_replace('/.*(PCRE Library Version => .*?$).*/sm', '$1', $phpinfo) . "\n"; $tests = array(); $test_string = mb_convert_encoding('&#x0BA8;&#x0BBF;', 'UTF-16', 'HTML-ENTITIES'); print "$test_string\n"; $tests['string_length'] = (mb_strlen($test_string, 'UTF-16') === 1); $tests['string_match'] = (preg_match('/^\X$/u', $test_string) === 1); $fails = array(); foreach ($tests as $key => $value) { if ($value === false) { $fails[$key] = $value; } } if (count($fails) > 0) { echo "Failed: " . join(', ', array_keys($fails)) . "\n"; exit(1); } exit(0);

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)
7.4.00.0070.01315.03
7.3.120.0100.00714.92
7.3.110.0110.00714.91
7.3.100.0030.01315.11
7.3.90.0070.01015.06
7.3.80.0060.00614.75
7.3.70.0060.00814.99
7.3.60.0030.00915.00
7.3.50.0000.01414.77
7.3.40.0110.00414.93
7.3.30.0000.01414.80
7.3.20.0050.00516.90
7.3.10.0060.00316.81
7.3.00.0030.01316.64
7.2.250.0130.00314.92
7.2.240.0120.00614.92
7.2.230.0030.01015.26
7.2.220.0070.00715.16
7.2.210.0140.00015.12
7.2.200.0070.00715.26
7.2.190.0000.01515.10
7.2.180.0040.01415.12
7.2.170.0070.00715.16
7.2.00.0070.00719.66
7.1.330.0060.01015.77
7.1.320.0000.01415.77
7.1.310.0030.01015.61
7.1.300.0100.00315.64
7.1.290.0030.00915.71
7.1.280.0040.00715.98
7.1.270.0080.00415.57
7.1.260.0060.00616.05
7.1.100.0040.00818.28
7.1.70.0040.00417.03
7.1.60.0030.00717.09
7.1.50.0090.01616.88
7.1.00.0000.04322.32
7.0.200.0060.00916.52
7.0.140.0030.07322.04
7.0.70.0100.05721.67
7.0.60.0030.07021.70
7.0.50.0070.05022.18
7.0.40.0070.08020.06
7.0.30.0100.07320.14
7.0.20.0070.06019.95
7.0.10.0130.07720.09
7.0.00.0130.08020.17
5.6.280.0030.07321.06
5.6.220.0070.06320.55
5.6.210.0070.05720.61
5.6.200.0130.07320.98
5.6.190.0030.08721.11
5.6.180.0000.06321.06
5.6.170.0070.08021.09
5.6.160.0130.07320.93
5.6.150.0070.08021.06
5.6.140.0030.08321.07
5.6.130.0130.06321.10
5.6.120.0000.08721.13
5.6.110.0070.07321.05
5.6.100.0030.06720.99
5.6.90.0100.05021.04
5.6.80.0070.06020.48
5.6.70.0100.06020.29
5.6.60.0070.06320.50
5.6.50.0030.07720.34
5.6.40.0000.08020.44
5.6.30.0030.08320.48
5.6.20.0070.07320.39
5.6.10.0070.07020.48
5.6.00.0030.08020.41
5.5.360.0170.06720.57
5.5.350.0170.05020.56
5.5.340.0200.04717.96
5.5.330.0130.05018.04
5.5.320.0100.05017.79
5.5.310.0030.05717.86
5.5.300.0070.06318.13
5.5.290.0100.07317.84
5.5.280.0130.05317.86
5.5.270.0100.05317.97
5.5.260.0230.04718.09
5.5.250.0100.07017.92
5.5.240.0200.05717.48
5.5.230.0070.06017.41
5.5.220.0100.05317.47
5.5.210.0130.04317.32
5.5.200.0000.06017.26
5.5.190.0070.05717.45
5.5.180.0070.05717.33
5.5.160.0200.06317.45
5.5.150.0100.05717.19
5.5.140.0130.07317.24
5.5.130.0030.05317.37
5.5.120.0130.04717.37
5.5.110.0000.06317.18
5.5.100.0170.04717.12
5.5.90.0070.05017.34
5.5.80.0200.06717.23
5.5.70.0170.04717.14
5.5.60.0070.05017.18
5.5.50.0130.04717.36
5.5.40.0100.05317.23
5.5.30.0030.05717.03
5.5.20.0100.05717.00
5.5.10.0170.04317.02
5.5.00.0070.06017.33
5.4.450.0100.06719.27
5.4.440.0170.05019.23
5.4.430.0070.08319.20
5.4.420.0100.07719.13
5.4.410.0030.07719.13
5.4.400.0130.04318.88
5.4.390.0030.06019.04
5.4.380.0030.05718.89
5.4.370.0000.05719.04
5.4.360.0100.05718.93
5.4.350.0200.05018.86
5.4.340.0200.06718.87
5.4.320.0130.07318.94
5.4.310.0230.05318.89
5.4.300.0100.05318.80
5.4.290.0030.05719.04
5.4.280.0100.05319.04
5.4.270.0200.04318.94
5.4.260.0130.06019.07
5.4.250.0070.05318.88
5.4.240.0170.04018.88
5.4.230.0100.05318.81
5.4.220.0070.05318.93
5.4.210.0070.05719.04
5.4.200.0000.07018.75
5.4.190.0070.05318.98
5.4.180.0130.05019.04
5.4.170.0070.05318.93
5.4.160.0070.05319.00
5.4.150.0000.08718.99
5.4.140.0030.05316.07
5.4.130.0070.04716.02
5.4.120.0070.05016.13
5.4.110.0170.06716.39
5.4.100.0000.05716.14
5.4.90.0130.04316.41
5.4.80.0070.04716.33
5.4.70.0070.05016.31
5.4.60.0070.05316.36
5.4.50.0200.03716.16
5.4.40.0070.05016.38
5.4.30.0000.05316.05
5.4.20.0000.05716.17
5.4.10.0030.05316.33
5.4.00.0030.05015.52
5.3.290.0130.05314.41
5.3.280.0130.06714.41
5.3.270.0070.05314.41
5.3.260.0130.07014.42
5.3.250.0070.05314.47
5.3.240.0100.05314.48
5.3.230.0030.05714.38
5.3.220.0070.05314.43
5.3.210.0070.06314.29
5.3.200.0070.05014.42
5.3.190.0070.05314.45
5.3.180.0070.05014.44
5.3.170.0070.05314.44
5.3.160.0030.05314.29
5.3.150.0030.05314.29
5.3.140.0030.05014.31
5.3.130.0070.05314.36
5.3.120.0170.04314.30
5.3.110.0100.05314.42
5.3.100.0100.04713.82
5.3.90.0070.05713.80
5.3.80.0100.04713.71
5.3.70.0200.04713.82
5.3.60.0070.05013.89
5.3.50.0100.04713.68
5.3.40.0130.04713.71
5.3.30.0100.04713.65
5.3.20.0000.05313.41
5.3.10.0070.05013.45
5.3.00.0070.05713.40
5.2.170.0070.04314.71
5.2.160.0100.05014.71
5.2.150.0030.05314.71
5.2.140.0070.05014.71
5.2.130.0000.06014.71
5.2.120.0030.05714.71
5.2.110.0070.03714.71
5.2.100.0030.05714.71
5.2.90.0030.05014.71
5.2.80.0070.06014.71
5.2.70.0070.05714.71
5.2.60.0030.04714.71
5.2.50.0070.06014.71
5.2.40.0100.05014.71
5.2.30.0030.06714.71
5.2.20.0000.05014.71
5.2.10.0100.05314.71
5.2.00.0030.05714.71
5.1.60.0000.05714.71
5.1.50.0000.05714.71
5.1.40.0000.05014.71
5.1.30.0100.05014.71
5.1.20.0030.03314.71
5.1.10.0070.03014.71
5.1.00.0000.03014.71
5.0.50.0030.04314.71
5.0.40.0070.03714.71
5.0.30.0030.02714.71
5.0.20.0000.02014.71
5.0.10.0000.02014.71
5.0.00.0000.03714.71
4.4.90.0000.03014.71
4.4.80.0000.03314.71
4.4.70.0030.03014.71
4.4.60.0000.02014.71
4.4.50.0000.03714.71
4.4.40.0000.04714.71
4.4.30.0030.02014.71
4.4.20.0000.02314.71
4.4.10.0000.02014.71
4.4.00.0030.05314.71
4.3.110.0030.01314.71
4.3.100.0000.01314.71
4.3.90.0030.01314.71
4.3.80.0000.03014.71
4.3.70.0000.02314.71
4.3.60.0000.03314.71
4.3.50.0000.02714.71
4.3.40.0000.03014.71
4.3.30.0030.02714.71
4.3.20.0000.02014.71
4.3.10.0030.03314.71
4.3.00.0030.02014.71

preferences:
38.97 ms | 400 KiB | 5 Q