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('&#xAC00;&#xAC01;&#x0BA8;&#x0BBF;', 'UTF-8', 'HTML-ENTITIES'); print "$test_string\n"; $tests['string_length'] = (mb_strlen($test_string, 'UTF-8') === 3); $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.3.120.0100.00714.86
7.3.110.0110.00414.89
7.3.100.0030.00915.14
7.3.90.0080.00315.27
7.3.80.0060.00614.96
7.3.70.0000.01414.92
7.3.60.0090.00314.98
7.3.50.0070.00714.96
7.3.40.0090.00615.02
7.3.30.0060.00614.75
7.3.20.0030.00916.85
7.3.10.0040.00816.70
7.3.00.0130.00316.55
7.2.240.0030.01014.88
7.2.230.0040.01115.00
7.2.220.0040.01114.89
7.2.210.0100.00715.12
7.2.200.0000.01014.96
7.2.190.0070.01015.16
7.2.180.0040.01115.29
7.2.170.0040.01114.83
7.2.160.0070.00414.82
7.2.150.0130.00316.98
7.2.140.0000.01017.16
7.2.130.0070.00317.09
7.2.120.0040.01117.22
7.2.110.0130.00016.70
7.2.100.0060.00817.02
7.2.90.0000.01316.80
7.2.80.0070.01116.87
7.2.70.0070.00717.09
7.2.60.0130.00316.81
7.2.50.0060.00917.15
7.2.40.0000.01416.99
7.2.30.0070.01117.12
7.2.20.0000.01416.88
7.2.10.0070.00717.02
7.2.00.0060.00718.20
7.1.330.0080.00815.84
7.1.320.0120.00015.95
7.1.310.0000.01215.79
7.1.300.0100.00716.05
7.1.290.0040.01115.75
7.1.280.0060.00615.75
7.1.270.0000.01315.83
7.1.260.0060.00915.76
7.1.250.0070.00715.43
7.1.100.4340.01317.73
7.1.70.0070.00017.28
7.1.60.0100.01419.70
7.1.50.0100.01016.80
7.1.00.0070.06722.58
7.0.200.0040.00716.89
7.0.140.0000.07322.12
7.0.60.0370.07319.84
7.0.50.0400.07020.33
7.0.40.0370.06320.19
7.0.30.0230.06320.11
7.0.20.0200.06020.14
7.0.10.0230.08020.03
7.0.00.0270.05720.06
5.6.280.0000.07720.84
5.6.210.0270.07320.52
5.6.200.0230.08320.96
5.6.190.0330.07320.99
5.6.180.0170.07321.13
5.6.170.0230.05321.14
5.6.160.0300.06021.14
5.6.150.0200.07321.00
5.6.140.0170.07021.14
5.6.130.0230.06720.99
5.6.120.0370.07320.98
5.6.110.0270.08021.02
5.6.100.0330.06720.99
5.6.90.0200.07321.11
5.6.80.0300.07020.37
5.6.70.0430.05720.45
5.6.60.0200.04020.38
5.6.50.0300.07320.53
5.6.40.0300.04320.48
5.6.30.0170.05720.36
5.6.20.0300.06720.37
5.6.10.0270.07020.46
5.6.00.0370.06720.47
5.5.350.0030.06720.59
5.5.340.0100.05717.98
5.5.330.0070.05317.95
5.5.320.0070.05717.77
5.5.310.0100.05717.76
5.5.300.0100.05017.98
5.5.290.0130.05018.13
5.5.280.0030.08018.25
5.5.270.0100.05318.09
5.5.260.0100.05318.09
5.5.250.0100.06317.86
5.5.240.0100.05017.25
5.5.230.0230.04017.52
5.5.220.0070.05317.48
5.5.210.0030.05717.50
5.5.200.0030.05317.53
5.5.190.0030.06017.42
5.5.180.0100.05717.34
5.5.160.0130.04317.45
5.5.150.0070.05317.29
5.5.140.0070.05017.60
5.5.130.0170.04717.41
5.5.120.0100.05017.11
5.5.110.0100.05017.48
5.5.100.0070.05317.10
5.5.90.0070.05317.34
5.5.80.0070.05017.34
5.5.70.0070.05317.02
5.5.60.0070.05017.10
5.5.50.0030.05717.33
5.5.40.0100.04717.39
5.5.30.0100.05017.33
5.5.20.0030.06017.26
5.5.10.0070.05317.30
5.5.00.0070.05317.33
5.4.450.0070.06019.26
5.4.440.0130.05019.42
5.4.430.0130.07019.30
5.4.420.0000.06019.49
5.4.410.0200.06019.20
5.4.400.0200.06719.10
5.4.390.0170.05719.18
5.4.380.0030.05318.93
5.4.370.0070.07319.18
5.4.360.0100.05719.01
5.4.350.0170.04319.00
5.4.340.0070.05319.02
5.4.320.0070.07318.93
5.4.310.0030.05719.02
5.4.300.0070.05318.95
5.4.290.0070.06019.00
5.4.280.0100.05019.06
5.4.270.0070.06719.15
5.4.260.0100.05718.93
5.4.250.0200.06019.15
5.4.240.0130.04718.92
5.4.230.0170.05019.15
5.4.220.0070.05718.97
5.4.210.0070.05319.14
5.4.200.0070.06319.12
5.4.190.0130.05318.97
5.4.180.0000.05718.99
5.4.170.0070.05718.99
5.4.160.0070.05319.13
5.4.150.0100.05319.08
5.4.140.0070.05316.46
5.4.130.0170.05016.57
5.4.120.0200.03716.25
5.4.110.0000.05716.32
5.4.100.0070.05016.17
5.4.90.0100.04716.54
5.4.80.0070.04716.50
5.4.70.0070.05016.52
5.4.60.0100.04716.26
5.4.50.0070.04716.31
5.4.40.0130.04316.33
5.4.30.0100.04716.19
5.4.20.0170.04016.14
5.4.10.0130.04716.43
5.4.00.0030.06015.76
5.3.290.0100.05314.56
5.3.280.0200.06014.60
5.3.270.0030.08014.47
5.3.260.0100.05014.64
5.3.250.0100.05014.62
5.3.240.0130.05714.66
5.3.230.0330.04314.54
5.3.220.0070.05014.52
5.3.210.0100.05014.53
5.3.200.0030.05314.58
5.3.190.0200.05014.51
5.3.180.0170.04714.44
5.3.170.0130.04314.57
5.3.160.0130.04314.45
5.3.150.0130.04314.57
5.3.140.0030.05314.45
5.3.130.0030.05314.41
5.3.120.0200.04314.48
5.3.110.0070.05314.45
5.3.100.0130.05014.05
5.3.90.0100.06713.96
5.3.80.0130.05013.86
5.3.70.0000.05713.92
5.3.60.0030.06013.89
5.3.50.0070.05313.97
5.3.40.0030.05313.89
5.3.30.0030.05313.82
5.3.20.0000.05713.59
5.3.10.0070.07013.67
5.3.00.0170.04313.57
5.2.170.0100.02711.08
5.2.160.0100.02710.98
5.2.150.0130.03311.07
5.2.140.0100.03311.07
5.2.130.0200.03710.89
5.2.120.0130.03010.93
5.2.110.0170.02011.02
5.2.100.0070.03311.04
5.2.90.0130.02311.10
5.2.80.0230.05311.12
5.2.70.0230.04010.94
5.2.60.0170.06310.98
5.2.50.0200.03710.95
5.2.40.0230.04711.00
5.2.30.0130.04310.97
5.2.20.0130.04310.96
5.2.10.0170.05010.72
5.2.00.0170.04010.71
5.1.60.0230.0279.84
5.1.50.0170.0509.99
5.1.40.0230.04710.04
5.1.30.0170.05310.36
5.1.20.0200.05310.32
5.1.10.0230.05010.11
5.1.00.0130.05310.05
5.0.50.0070.0379.06
5.0.40.0070.0409.06
5.0.30.0100.0609.06
5.0.20.0070.0409.06
5.0.10.0030.0409.06
5.0.00.0070.0639.06
4.4.90.0030.0339.06
4.4.80.0070.0379.06
4.4.70.0070.0339.06
4.4.60.0070.0339.06
4.4.50.0030.0339.06
4.4.40.0070.0509.06
4.4.30.0100.0339.06
4.4.20.0030.0379.06
4.4.10.0100.0339.06
4.4.00.0030.0579.06
4.3.110.0070.0379.06
4.3.100.0070.0379.06
4.3.90.0030.0379.06
4.3.80.0030.0539.06
4.3.70.0100.0239.06
4.3.60.0130.0279.06
4.3.50.0130.0309.06
4.3.40.0070.0509.06
4.3.30.0000.0379.06
4.3.20.0000.0409.06
4.3.10.0030.0339.06
4.3.00.0070.0309.06

preferences:
33.48 ms | 400 KiB | 5 Q