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); var_export($matches); 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-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.4.10.0100.00815.00
7.4.00.0050.01314.99
7.3.130.0110.00814.89
7.3.120.0050.01314.78
7.3.110.0130.00514.76
7.3.100.0030.01214.77
7.3.90.0070.00814.92
7.3.80.0090.00314.82
7.3.70.0040.00914.96
7.3.60.0060.00714.90
7.3.50.0050.00814.92
7.3.40.0070.00714.94
7.3.30.0060.00614.87
7.3.20.0030.01016.79
7.3.10.0080.00616.63
7.3.00.0040.00616.59
7.2.260.0050.01015.10
7.2.250.0070.00915.25
7.2.240.0100.00614.94
7.2.230.0030.01215.12
7.2.220.0030.01314.92
7.2.210.0070.00315.17
7.2.200.0030.01114.82
7.2.190.0040.01114.96
7.2.180.0020.01115.22
7.2.170.0070.00715.07
7.2.160.0080.00615.04
7.2.150.0100.00716.69
7.2.140.0100.00416.88
7.2.130.0050.00916.81
7.2.120.0020.01316.93
7.2.110.0070.01117.09
7.2.100.0050.01316.93
7.2.90.0070.00616.94
7.2.80.0050.00616.95
7.2.70.0030.00917.13
7.2.60.0020.01116.90
7.2.50.0060.00616.79
7.2.40.0050.00916.80
7.2.30.0060.00816.91
7.2.20.0030.00816.82
7.2.10.0070.00716.69
7.2.00.0060.00917.86
7.1.330.0070.00615.74
7.1.320.0040.01215.79
7.1.310.0050.00915.67
7.1.300.0070.00515.74
7.1.290.0080.00415.36
7.1.280.0020.01115.66
7.1.270.0050.00815.95
7.1.260.0020.01015.77
7.1.250.0040.00715.80
7.1.240.0030.01015.69
7.1.230.0020.01215.79
7.1.220.0080.00815.80
7.1.210.0050.00815.70
7.1.200.0070.00615.96
7.1.190.0000.00915.92
7.1.180.0000.01315.76
7.1.170.0040.00715.86
7.1.160.0060.00615.90
7.1.150.0050.00915.65
7.1.140.0050.01115.80
7.1.130.0030.01015.70
7.1.120.0030.00915.49
7.1.110.0040.00816.04
7.1.100.0060.00816.59
7.1.90.0070.00815.68
7.1.80.0080.00915.67
7.1.70.0040.00516.16
7.1.60.0050.00916.33
7.1.50.0060.01316.17
7.1.40.0050.00615.71
7.1.30.0080.00615.93
7.1.20.0030.00915.66
7.1.10.0040.00815.89
7.1.00.0010.02218.05
7.0.330.0060.00615.56
7.0.320.0040.00815.68
7.0.310.0060.00815.39
7.0.300.0030.01015.51
7.0.290.0020.00915.55
7.0.280.0130.00215.46
7.0.270.0020.00915.25
7.0.260.0080.00415.37
7.0.250.0040.00615.21
7.0.240.0010.01015.45
7.0.230.0060.00715.46
7.0.220.0040.00915.55
7.0.210.0070.00615.47
7.0.200.0060.00915.98
7.0.190.0020.01215.24
7.0.180.0020.01215.45
7.0.170.0040.00715.36
7.0.160.0020.01015.65
7.0.150.0080.00515.51
7.0.140.0010.03417.70
7.0.130.0030.00515.41
7.0.120.0100.00015.47
7.0.110.0000.01115.34
7.0.100.0030.00915.48
7.0.90.0020.01015.54
7.0.80.0030.00815.46
7.0.70.0070.00715.54
7.0.60.0050.03316.92
7.0.50.0030.02916.35
7.0.40.0060.01715.72
7.0.30.0140.02315.85
7.0.20.0110.01815.71
7.0.10.0030.02915.86
7.0.00.0050.02215.76
5.6.400.0060.00614.18
5.6.390.0050.01214.35
5.6.380.0030.00914.43
5.6.370.0040.01014.22
5.6.360.0030.01114.17
5.6.350.0070.00414.49
5.6.340.0060.00414.23
5.6.330.0040.00914.22
5.6.320.0030.00714.24
5.6.310.0060.00614.41
5.6.300.0050.00814.37
5.6.290.0070.00914.05
5.6.280.0030.03116.76
5.6.270.0070.00514.34
5.6.260.0030.00714.40
5.6.250.0060.00814.27
5.6.240.0080.00614.26
5.6.230.0040.00914.43
5.6.220.0070.00814.20
5.6.210.0060.03416.54
5.6.200.0080.01515.50
5.6.190.0080.03416.29
5.6.180.0060.03516.49
5.6.170.0130.02616.28
5.6.160.0030.03616.54
5.6.150.0030.02215.70
5.6.140.0040.02115.67
5.6.130.0040.01915.58
5.6.120.0040.02516.66
5.6.110.0070.03416.52
5.6.100.0060.03416.69
5.6.90.0070.03016.51
5.6.80.0030.03616.37
5.6.70.0090.00514.25
5.6.60.0070.00814.20
5.6.50.0030.01114.19
5.6.40.0070.00614.16
5.6.30.0060.01114.12
5.6.20.0070.00814.13
5.6.10.0070.00414.15
5.6.00.0080.00714.19
5.5.380.0080.00514.65
5.5.370.0040.00814.50
5.5.360.0050.00514.49
5.5.350.0090.02116.56
5.5.340.0060.02115.63
5.5.330.0100.02215.61
5.5.320.0060.02615.64
5.5.310.0100.02115.84
5.5.300.0040.02915.63
5.5.290.0080.02115.66
5.5.280.0070.02515.71
5.5.270.0110.02015.67
5.5.260.0110.02015.72
5.5.250.0040.02515.60
5.5.240.0050.02915.43
5.5.230.0090.00614.48
5.5.220.0050.01114.47
5.5.210.0060.00514.58
5.5.200.0080.00714.27
5.5.190.0050.00714.48
5.5.180.0030.00914.37
5.5.170.0050.00914.51
5.5.160.0080.00614.43
5.5.150.0070.00414.36
5.5.140.0050.00714.48
5.5.130.0050.00914.42
5.5.120.0080.00614.57
5.5.110.0090.00614.55
5.5.100.0090.00314.26
5.5.90.0030.00814.41
5.5.80.0030.00914.31
5.5.70.0050.00914.34
5.5.60.0050.00814.39
5.5.50.0070.00514.51
5.5.40.0020.00914.25
5.5.30.0050.00814.58
5.5.20.0040.01114.48
5.5.10.0040.00814.20
5.5.00.0050.00914.53
5.4.450.0070.02114.02
5.4.440.0080.02414.11
5.4.430.0080.02014.08
5.4.420.0110.01814.12
5.4.410.0110.01414.11
5.4.400.0040.02213.89
5.4.390.0050.02314.01
5.4.380.0070.02013.91
5.4.370.0060.02514.00
5.4.360.0010.02813.98
5.4.350.0020.02313.90
5.4.340.0070.02013.98
5.4.330.0020.00611.64
5.4.320.0060.02313.93
5.4.310.0090.02014.01
5.4.300.0080.01914.05
5.4.290.0100.02214.04
5.4.280.0130.01714.03
5.4.270.0070.01914.06
5.4.260.0030.02814.00
5.4.250.0080.02313.93
5.4.240.0060.02114.04
5.4.230.0050.02413.99
5.4.220.0080.01814.04
5.4.210.0120.01514.06
5.4.200.0080.01814.05
5.4.190.0060.02113.96
5.4.180.0070.02114.03
5.4.170.0070.02414.00
5.4.160.0120.02213.97
5.4.150.0120.02013.98
5.4.140.0080.01913.17
5.4.130.0040.02313.07
5.4.120.0090.01713.08
5.4.110.0060.02213.00
5.4.100.0060.01813.19
5.4.90.0080.01913.11
5.4.80.0070.02113.03
5.4.70.0060.02413.11
5.4.60.0040.02313.08
5.4.50.0100.01513.05
5.4.40.0060.01813.09
5.4.30.0070.02113.17
5.4.20.0070.01913.01
5.4.10.0030.02313.09
5.4.00.0070.02012.88
5.3.290.0060.02212.37
5.3.280.0080.01912.23
5.3.270.0110.02212.28
5.3.260.0020.02612.31
5.3.250.0060.02612.37
5.3.240.0070.02012.32
5.3.230.0070.02212.21
5.3.220.0040.02512.31
5.3.210.0080.02112.26
5.3.200.0060.02112.31
5.3.190.0070.02112.29
5.3.180.0050.02512.27
5.3.170.0080.01612.32
5.3.160.0020.02412.36
5.3.150.0010.02612.35
5.3.140.0100.02312.29
5.3.130.0040.02612.22
5.3.120.0020.02512.22
5.3.110.0030.02612.33
5.3.100.0030.02312.17
5.3.90.0110.01512.13
5.3.80.0040.02312.00
5.3.70.0070.01812.04
5.3.60.0030.02212.08
5.3.50.0090.01912.02
5.3.40.0030.02312.03
5.3.30.0030.02312.03
5.3.20.0080.02411.93
5.3.10.0020.02211.91
5.3.00.0070.01911.92
5.2.170.0170.03312.34
5.2.160.0200.03712.34
5.2.150.0230.05712.34
5.2.140.0270.05012.34
5.2.130.0200.04712.34
5.2.120.0230.03012.34
5.2.110.0400.04312.34
5.2.100.0270.06012.34
5.2.90.0230.04012.34
5.2.80.0270.03312.34
5.2.70.0270.05712.34
5.2.60.0170.03012.34
5.2.50.0200.06312.34
5.2.40.0130.03312.34
5.2.30.0170.03712.34
5.2.20.0200.03012.34
5.2.10.0170.02312.34
5.2.00.0170.02312.34
5.1.60.0130.05312.34
5.1.50.0100.02712.34
5.1.40.0130.02312.34
5.1.30.0130.02712.34
5.1.20.0100.03312.34
5.1.10.0230.04712.34
5.1.00.0100.03312.34
5.0.50.0130.02012.34
5.0.40.0070.02012.34
5.0.30.0070.06712.34
5.0.20.0100.04312.34
5.0.10.0070.02712.34
5.0.00.0070.04312.34
4.4.90.0100.02012.34
4.4.80.0170.01012.34
4.4.70.0000.02712.34
4.4.60.0070.02012.34
4.4.50.0070.03712.34
4.4.40.0030.02712.34
4.4.30.0070.01312.34
4.4.20.0030.02712.34
4.4.10.0100.01312.34
4.4.00.0070.02712.34
4.3.110.0170.01312.34
4.3.100.0130.02712.34
4.3.90.0100.02312.34
4.3.80.0200.02312.34
4.3.70.0070.03312.34
4.3.60.0030.02012.34
4.3.50.0130.02312.34
4.3.40.0100.03712.34
4.3.30.0070.01712.34
4.3.20.0030.02712.34
4.3.10.0030.03012.34
4.3.00.0030.02312.34

preferences:
41.29 ms | 400 KiB | 5 Q