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-8', 'HTML-ENTITIES'); print "$test_string\n"; $tests['string_length'] = (mb_strlen($test_string, 'UTF-8') === 1); $tests['string_match'] = (preg_match('/^\X\X\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.0090.00914.98
7.3.120.0120.00615.14
7.3.110.0070.01115.13
7.3.100.0040.01114.81
7.3.90.0080.00414.88
7.3.80.0030.00915.04
7.3.70.0090.00615.01
7.3.60.0050.00514.66
7.3.50.0130.00314.98
7.3.40.0030.01214.91
7.3.30.0120.00615.04
7.3.20.0030.00616.85
7.3.10.0060.00316.88
7.3.00.0030.01016.61
7.2.250.0100.01015.03
7.2.240.0100.01015.33
7.2.230.0040.00715.00
7.2.220.0080.00415.23
7.2.210.0000.00914.96
7.2.200.0100.01015.11
7.2.190.0080.00314.86
7.2.180.0030.01315.03
7.2.170.0030.01514.82
7.2.00.0040.00419.41
7.1.330.0100.00315.83
7.1.320.0030.00916.06
7.1.310.0110.00415.75
7.1.300.0040.01215.81
7.1.290.0080.00815.85
7.1.280.0100.01015.79
7.1.270.0060.01315.86
7.1.260.0030.01015.85
7.1.100.0000.01418.60
7.1.70.0000.01017.04
7.1.60.0070.01719.82
7.1.50.0110.00416.86
7.1.00.0030.07722.38
7.0.200.0070.00716.82
7.0.140.0030.07722.18
7.0.70.0070.08021.63
7.0.60.0030.07721.55
7.0.50.0070.08022.11
7.0.40.0070.07320.07
7.0.30.0000.06720.05
7.0.20.0100.06320.00
7.0.10.0170.05020.09
7.0.00.0000.08020.16
5.6.220.0070.08020.45
5.6.210.0000.07020.54
5.6.200.0030.04721.05
5.6.190.0070.08320.98
5.6.180.0030.07020.96
5.6.170.0030.08320.98
5.6.160.0070.06021.02
5.6.150.0100.06021.18
5.6.140.0130.07021.02
5.6.130.0030.08720.95
5.6.120.0030.08021.04
5.6.110.0070.08320.93
5.6.100.0100.05721.07
5.6.90.0030.08321.02
5.6.80.0030.08320.47
5.6.70.0070.07320.33
5.6.60.0070.07320.48
5.6.50.0000.07020.52
5.6.40.0130.07020.48
5.6.30.0070.08020.32
5.6.20.0030.08020.53
5.6.10.0070.05320.32
5.6.00.0030.07020.43
5.5.360.0230.06020.54
5.5.350.0130.06720.32
5.5.340.0130.05020.84
5.5.330.0130.06320.94
5.5.320.0100.05320.81
5.5.310.0100.06020.90
5.5.300.0100.05720.82
5.5.290.0130.06320.88
5.5.280.0130.05720.82
5.5.270.0200.07020.64
5.5.260.0200.08320.84
5.5.250.0100.06320.72
5.5.240.0100.05320.31
5.5.230.0200.05020.29
5.5.220.0100.07720.17
5.5.210.0130.05020.29
5.5.200.0070.08320.31
5.5.190.0030.07020.25
5.5.180.0100.05720.26
5.5.160.0130.05720.19
5.5.150.0000.06320.16
5.5.140.0230.06720.14
5.5.130.0200.06320.14
5.5.120.0200.07720.09
5.5.110.0170.05320.16
5.5.100.0200.05320.06
5.5.90.0170.05320.05
5.5.80.0070.05320.21
5.5.70.0070.06020.11
5.5.60.0000.06720.14
5.5.50.0200.05019.99
5.5.40.0170.05020.06
5.5.30.0030.06719.95
5.5.20.0170.05720.15
5.5.10.0100.06320.03
5.5.00.0070.06020.03
5.4.450.0100.06019.19
5.4.440.0230.06719.29
5.4.430.0270.05319.30
5.4.420.0100.05319.29
5.4.410.0130.04719.25
5.4.400.0070.05718.87
5.4.390.0070.05718.86
5.4.380.0100.07718.86
5.4.370.0230.06019.07
5.4.360.0200.07718.97
5.4.350.0170.05318.98
5.4.340.0130.07719.08
5.4.320.0100.06019.00
5.4.310.0170.05018.97
5.4.300.0100.07719.05
5.4.290.0130.05019.00
5.4.280.0130.07719.00
5.4.270.0200.04318.86
5.4.260.0130.07318.97
5.4.250.0100.06318.96
5.4.240.0070.08018.85
5.4.230.0170.04318.99
5.4.220.0030.07019.00
5.4.210.0170.05019.07
5.4.200.0100.06718.97
5.4.190.0130.06719.00
5.4.180.0100.07019.00
5.4.170.0130.05019.01
5.4.160.0100.04718.84
5.4.150.0130.05019.05
5.4.140.0030.06316.27
5.4.130.0070.05716.27
5.4.120.0100.04716.12
5.4.110.0100.05016.27
5.4.100.0130.06016.38
5.4.90.0070.04716.38
5.4.80.0130.05016.41
5.4.70.0100.05016.38
5.4.60.0130.04316.27
5.4.50.0030.05716.29
5.4.40.0170.05316.49
5.4.30.0070.05016.29
5.4.20.0070.04716.26
5.4.10.0100.07316.28
5.4.00.0130.05015.93
5.3.290.0170.06014.53
5.3.280.0070.06014.63
5.3.270.0130.05314.46
5.3.260.0200.06014.61
5.3.250.0100.04714.43
5.3.240.0170.05014.64
5.3.230.0130.04714.64
5.3.220.0170.04714.55
5.3.210.0000.06314.43
5.3.200.0170.04314.39
5.3.190.0170.05014.37
5.3.180.0200.06014.38
5.3.170.0170.05714.47
5.3.160.0170.04314.53
5.3.150.0030.05714.37
5.3.140.0100.07714.50
5.3.130.0130.04714.58
5.3.120.0070.05714.42
5.3.110.0100.05014.36
5.3.100.0170.04314.04
5.3.90.0100.06313.85
5.3.80.0030.05713.88
5.3.70.0170.05714.05
5.3.60.0130.05013.80
5.3.50.0100.04713.98
5.3.40.0030.06313.88
5.3.30.0070.06313.92
5.3.20.0100.05013.64
5.3.10.0030.05013.53
5.3.00.0070.05013.56
5.2.170.0070.04711.34
5.2.160.0030.06011.34
5.2.150.0000.06311.34
5.2.140.0000.06711.34
5.2.130.0070.05311.34
5.2.120.0070.02711.34
5.2.110.0000.06011.34
5.2.100.0070.05311.34
5.2.90.0030.06011.34
5.2.80.0030.06311.34
5.2.70.0100.06011.34
5.2.60.0030.05011.34
5.2.50.0070.05711.34
5.2.40.0030.04311.34
5.2.30.0030.04711.34
5.2.20.0000.05311.34
5.2.10.0030.05311.34
5.2.00.0000.06311.34
5.1.60.0030.05311.34
5.1.50.0000.03711.34
5.1.40.0070.05011.34
5.1.30.0000.05311.34
5.1.20.0070.05311.34
5.1.10.0000.04711.34
5.1.00.0100.04311.34
5.0.50.0030.04311.34
5.0.40.0000.04311.34
5.0.30.0070.06011.34
5.0.20.0000.04011.34
5.0.10.0000.04011.34
5.0.00.0000.06311.34
4.4.90.0000.03711.34
4.4.80.0030.02711.34
4.4.70.0030.03711.34
4.4.60.0030.03011.34
4.4.50.0000.03711.34
4.4.40.0000.04311.34
4.4.30.0000.03011.34
4.4.20.0000.03311.34
4.4.10.0030.02711.34
4.4.00.0030.04011.34
4.3.110.0000.03711.34
4.3.100.0000.03311.34
4.3.90.0000.03711.34
4.3.80.0000.05311.34
4.3.70.0030.02711.34
4.3.60.0030.03311.34
4.3.50.0000.03711.34
4.3.40.0000.05011.34
4.3.30.0000.02311.34
4.3.20.0000.02311.34
4.3.10.0000.03011.34
4.3.00.0000.03711.34

preferences:
63.91 ms | 401 KiB | 5 Q