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); } preg_match('/((?:a?)*)*c/', 'aac', $matches); if ($matches[1] === 'aa') { print "FAIL\n"; } else { print "PASS\n"; } error_reporting(E_ALL); ob_start(); phpinfo(); $phpinfo = ob_get_clean(); print preg_replace('/.*(PCRE Library Version => .*?$).*/sm', '$1', $phpinfo) . "\n"; exit(0); $tests = array(); $test_string = mb_convert_encoding('&#x0BA8;&#x0BBF;', 'UTF-32', 'HTML-ENTITIES'); print "$test_string\n"; print strlen($test_string) . "\n"; print mb_strlen($test_string, 'UTF-32') . "\n"; $tests['string_length'] = (mb_strlen($test_string, 'UTF-32') === 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.3.10.0090.00416.79
7.3.00.0040.00616.54
7.2.130.0060.01216.98
7.2.120.0060.00916.97
7.2.110.0020.00917.01
7.2.100.0080.00816.93
7.2.90.0110.00617.18
7.2.80.0120.00516.99
7.2.70.0050.00816.96
7.2.60.0100.00516.96
7.2.50.0060.00816.88
7.2.40.0090.00617.02
7.2.30.0040.00916.97
7.2.20.0080.00516.98
7.2.10.0150.00216.76
7.2.00.0080.00817.75
7.1.250.0080.00515.55
7.1.100.0050.00318.16
7.1.70.0040.00417.20
7.1.60.0030.00717.38
7.1.50.0030.00717.06
7.1.40.0000.01416.61
7.1.30.0000.01116.82
7.1.20.0060.00616.93
7.1.10.0050.00516.61
7.1.00.0030.00616.81
7.0.200.0030.00616.86
7.0.190.0000.01116.70
7.0.180.0030.00916.34
7.0.170.0000.01016.35
7.0.160.0050.00516.37
7.0.150.0050.00316.13
7.0.140.0000.00816.59
7.0.130.0040.00716.57
7.0.120.0000.01016.62
7.0.110.0030.00716.50
7.0.100.0000.01016.47
7.0.90.0040.00416.77
7.0.80.0150.00316.79
7.0.70.0000.01016.33
7.0.60.0030.00516.55
7.0.50.0000.00916.73
7.0.40.0000.00914.78
7.0.30.0060.00314.78
7.0.20.0030.00614.78
7.0.10.0000.01014.78
7.0.00.0000.00814.78
5.6.300.0030.04220.84
5.6.290.0100.03521.01
5.6.280.0060.03920.89
5.6.270.0070.04020.78
5.6.260.0000.09721.04
5.6.250.0030.03920.90
5.6.240.0030.04120.94
5.6.230.0070.04320.83
5.6.220.0030.04821.03
5.6.210.0000.04521.09
5.6.200.0000.05021.00
5.6.190.0000.04820.83
5.6.180.0100.03520.94
5.6.170.0030.04420.74
5.6.160.0060.04520.84
5.6.150.0030.04220.88
5.6.140.0000.04320.83
5.6.130.0000.04721.03
5.6.120.0030.04120.84
5.6.110.0100.03621.02
5.6.100.0070.04220.73
5.6.90.0070.05020.95
5.6.80.0030.03720.22
5.6.70.0040.04220.40
5.6.60.0000.04220.24
5.6.50.0070.04120.18
5.6.40.0030.04320.39
5.6.30.0000.04320.10
5.6.20.0060.03620.19
5.6.10.0070.04620.29
5.6.00.0070.03320.39
5.5.380.0030.08217.48
5.5.370.0000.04217.52
5.5.360.0000.05117.58
5.5.350.0000.04417.56
5.5.340.0000.04718.02
5.5.330.0070.04118.07
5.5.320.0060.04218.02
5.5.310.0070.03718.02
5.5.300.0000.04117.96
5.5.290.0060.04117.86
5.5.280.0100.03617.89
5.5.270.0000.04417.82
5.5.260.0030.04217.70
5.5.250.0330.03617.85
5.5.240.0030.03717.24
5.5.230.0030.04417.34
5.5.220.0030.04617.35
5.5.210.0030.08917.33
5.5.200.0000.04017.22
5.5.190.0000.04717.38
5.5.180.0000.04617.35
5.5.160.0170.04417.37
5.5.150.0000.04217.33
5.5.140.0000.04417.29
5.5.130.0000.04317.37
5.5.120.0240.04417.38
5.5.110.0070.03617.09
5.5.100.0030.04117.22
5.5.90.0030.04017.21
5.5.80.0030.03917.27
5.5.70.0070.03417.26
5.5.60.0100.03017.21
5.5.50.0000.04517.26
5.5.40.0070.03417.10
5.5.30.0030.03817.23
5.5.20.0030.03916.94
5.5.10.0000.03917.36
5.5.00.0030.03617.34
5.4.450.0040.03919.21
5.4.440.0130.03219.30
5.4.430.0030.04319.33
5.4.420.0040.03919.45
5.4.410.0100.04019.25
5.4.400.0030.03518.83
5.4.390.0000.05419.18
5.4.380.0070.03418.88
5.4.370.0030.03719.10
5.4.360.0030.03919.13
5.4.350.0030.03719.07
5.4.340.0070.04019.06
5.4.320.0030.04118.98
5.4.310.0030.04119.07
5.4.300.0000.04418.98
5.4.290.0000.04119.16
5.4.280.0000.04219.14
5.4.270.0260.04319.05
5.4.260.0030.05119.04
5.4.250.0000.04219.05
5.4.240.0030.04618.99
5.4.230.0070.03919.06
5.4.220.0030.03819.05
5.4.210.0030.03819.06
5.4.200.0000.04318.97
5.4.190.0030.03919.18
5.4.180.0000.04418.87
5.4.170.0070.03419.14
5.4.160.0030.04919.14
5.4.150.0030.04018.89
5.4.140.0000.03916.55
5.4.130.0030.03416.53
5.4.120.0000.03616.62
5.4.110.0030.03816.55
5.4.100.0030.03416.52
5.4.90.0030.03916.55
5.4.80.0000.04116.68
5.4.70.0030.07516.45
5.4.60.0000.03916.65
5.4.50.0000.03716.56
5.4.40.0030.03316.62
5.4.30.0030.03616.54
5.4.20.0030.03816.34
5.4.10.0030.03916.39
5.4.00.0030.03715.72
5.3.290.0030.04614.89
5.3.280.0100.04714.78
5.3.270.0090.03114.78
5.3.260.0070.04914.78
5.3.250.0030.03414.78
5.3.240.0000.04714.78
5.3.230.0070.03114.84
5.3.220.0070.03114.78
5.3.210.0000.04114.78
5.3.200.0040.03514.78
5.3.190.0000.04514.78
5.3.180.0000.03814.78
5.3.170.0000.04514.78
5.3.160.0030.03814.78
5.3.150.0060.03514.78
5.3.140.0000.04114.78
5.3.130.0030.03814.78
5.3.120.0000.04314.78
5.3.110.0070.04314.78
5.3.100.0000.04214.78
5.3.90.0130.03614.78
5.3.80.0100.04814.78
5.3.70.0070.03714.78
5.3.60.0000.03614.78
5.3.50.0000.04114.78
5.3.40.0100.03214.78
5.3.30.0000.04014.78
5.3.20.0030.03314.78
5.3.10.0030.03214.78
5.3.00.0180.03214.78
5.2.170.0030.03114.78
5.2.160.0070.02314.78
5.2.150.0030.03014.78
5.2.140.0000.03414.78
5.2.130.0030.02714.78
5.2.120.0070.02614.78
5.2.110.0030.02714.78
5.2.100.0000.03114.78
5.2.90.0000.03014.78
5.2.80.0090.02114.78
5.2.70.0000.03214.78
5.2.60.0110.03214.78
5.2.50.0070.02614.78
5.2.40.0030.02914.78
5.2.30.0040.03214.78
5.2.20.0000.03814.78
5.2.10.0030.02614.78
5.2.00.0000.03014.78
5.1.60.0030.02314.78
5.1.50.0070.03714.78
5.1.40.0000.02514.78
5.1.30.0000.03214.78
5.1.20.0030.02414.78
5.1.10.0000.02614.78
5.1.00.0060.04914.78
5.0.50.0000.02214.78
5.0.40.0040.02514.78
5.0.30.0000.03214.78
5.0.20.0030.01714.78
5.0.10.0000.02414.78
5.0.00.0030.02814.78
4.4.90.0000.01814.78
4.4.80.0090.00914.78
4.4.70.0090.01514.78
4.4.60.0000.02014.78
4.4.50.0030.01314.78
4.4.40.0000.03514.78
4.4.30.0070.01314.78
4.4.20.0000.02814.78
4.4.10.0030.01314.78
4.4.00.0000.02514.78
4.3.110.0040.01414.78
4.3.100.0000.01614.78
4.3.90.0030.01514.78
4.3.80.0030.02114.78
4.3.70.0070.01114.78
4.3.60.0000.01614.78
4.3.50.0000.02614.78
4.3.40.0000.02914.78
4.3.30.0000.01714.78
4.3.20.0000.01714.78
4.3.10.0000.01714.78
4.3.00.0030.01514.78

preferences:
31.21 ms | 400 KiB | 5 Q