3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * This should produce failures when using a version of libpcre older than 8.32 */ 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;', '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)
8.3.60.0120.00616.63
8.3.50.0100.00921.93
8.3.40.0090.00618.92
8.3.30.0080.00619.04
8.3.20.0080.00020.16
8.3.10.0000.00723.65
8.3.00.0050.00322.51
8.2.180.0060.00916.34
8.2.170.0070.00722.96
8.2.160.0130.00320.29
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00726.16
8.2.120.0000.00822.08
8.2.110.0030.00622.15
8.2.100.0080.00417.84
8.2.90.0040.00419.13
8.2.80.0040.00417.97
8.2.70.0030.00617.36
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0000.00918.16
8.2.30.0000.00818.09
8.2.20.0040.00417.61
8.2.10.0040.00417.63
8.2.00.0040.00417.63
8.1.280.0150.00625.92
8.1.270.0060.00323.97
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00023.92
8.1.230.0060.00618.97
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0080.00017.23
8.1.190.0040.00417.43
8.1.180.0030.00618.10
8.1.170.0080.00018.51
8.1.160.0070.00022.00
8.1.150.0000.00818.50
8.1.140.0040.00417.41
8.1.130.0030.00317.71
8.1.120.0040.00417.31
8.1.110.0000.00817.25
8.1.100.0070.00017.38
8.1.90.0070.00017.37
8.1.80.0000.00717.40
8.1.70.0030.00317.23
8.1.60.0040.00417.37
8.1.50.0080.00017.38
8.1.40.0000.00817.39
8.1.30.0000.00817.55
8.1.20.0000.00817.63
8.1.10.0040.00417.56
8.1.00.0000.00717.41
8.0.300.0040.00418.77
8.0.290.0080.00017.04
8.0.280.0000.00718.42
8.0.270.0050.00317.22
8.0.260.0030.00316.77
8.0.250.0030.00316.96
8.0.240.0080.00017.00
8.0.230.0070.00016.93
8.0.220.0070.00016.82
8.0.210.0000.00716.91
8.0.200.0000.00616.88
8.0.190.0040.00416.89
8.0.180.0050.00316.79
8.0.170.0040.00416.94
8.0.160.0040.00416.95
8.0.150.0070.00016.75
8.0.140.0000.00716.85
8.0.130.0000.00613.85
8.0.120.0030.00616.82
8.0.110.0040.00416.83
8.0.100.0000.00716.92
8.0.90.0080.00016.73
8.0.80.0120.00916.93
8.0.70.0040.00416.93
8.0.60.0030.00516.78
8.0.50.0000.00716.77
8.0.30.0100.01017.14
8.0.20.0120.00717.40
8.0.10.0040.00416.86
8.0.00.0090.00916.72
7.4.330.0020.00215.23
7.4.320.0000.00616.87
7.4.300.0040.00416.93
7.4.290.0070.00016.84
7.4.280.0000.00716.76
7.4.270.0030.00316.77
7.4.260.0000.00716.84
7.4.250.0070.00016.73
7.4.240.0040.00316.89
7.4.230.0000.00716.76
7.4.220.0180.00016.97
7.4.210.0080.00816.95
7.4.200.0000.00716.86
7.4.190.0080.00016.95
7.4.160.0120.00616.95
7.4.150.0100.00717.40
7.4.140.0110.00817.86
7.4.130.0110.01016.88
7.4.120.0050.01417.04
7.4.110.0060.01216.89
7.4.100.0130.00416.78
7.4.90.0100.01416.78
7.4.80.0130.01019.39
7.4.70.0070.01016.77
7.4.60.0090.01316.97
7.4.50.0040.00416.71
7.4.40.0100.00722.77
7.4.30.0160.00016.83
7.4.00.0030.01415.33
7.3.330.0040.00313.44
7.3.320.0000.00613.62
7.3.310.0070.00016.79
7.3.300.0030.00316.50
7.3.290.0160.00016.73
7.3.280.0070.01216.72
7.3.270.0090.01517.40
7.3.260.0100.00916.74
7.3.250.0110.00616.63
7.3.240.0100.00716.74
7.3.230.0060.01016.70
7.3.210.0030.01316.65
7.3.200.0120.00919.39
7.3.190.0100.00716.66
7.3.180.0060.00916.76
7.3.170.0110.01116.68
7.3.160.0120.01016.65
7.3.120.0120.00315.16
7.2.330.0200.01516.86
7.2.320.0040.01416.91
7.2.310.0060.01616.97
7.2.300.0160.00816.93
7.2.290.0000.01716.85
7.2.60.0080.00417.22
7.2.00.0030.01019.67
7.1.200.0060.00616.05
7.1.100.0060.00618.60
7.1.70.0030.00617.29
7.1.60.0070.01519.29
7.1.50.0100.01417.38
7.1.00.0030.07722.38
7.0.200.0120.00017.05
7.0.140.0030.07321.95
7.0.100.0300.04019.90
7.0.90.0170.05019.91
7.0.80.0100.05019.98
7.0.70.0130.04719.97
7.0.60.0000.07019.89
7.0.50.0070.04320.41
7.0.40.0070.05020.07
7.0.30.0000.08319.95
7.0.20.0030.06320.05
7.0.10.0030.05020.07
7.0.00.0100.08020.05
5.6.280.0000.07720.92
5.6.250.0100.03720.57
5.6.240.0030.07320.64
5.6.230.0100.06320.64
5.6.220.0000.07720.62
5.6.210.0030.08020.60
5.6.200.0030.04721.14
5.6.190.0170.06021.04
5.6.180.0170.06320.96
5.6.170.0100.04321.07
5.6.160.0070.05320.94
5.6.150.0070.03320.94
5.6.140.0030.05021.07
5.6.130.0070.04721.04
5.6.120.0100.04721.06
5.6.110.0000.04721.02
5.6.100.0030.05721.05
5.6.90.0130.07021.03
5.6.80.0070.04020.45
5.6.70.0000.04320.48
5.6.60.0130.07020.30
5.6.50.0030.06720.37
5.6.40.0100.07720.45
5.6.30.0000.04020.50
5.6.20.0070.03720.46
5.6.10.0070.05020.42
5.6.00.0100.06320.39
5.5.380.0030.04720.38
5.5.370.0070.04320.36
5.5.360.0070.04020.35
5.5.350.0170.08020.39
5.5.340.0170.03320.87
5.5.330.0070.06320.81
5.5.320.0070.08720.74
5.5.310.0170.06720.88
5.5.300.0130.06720.77
5.5.290.0000.08720.76
5.5.280.0000.04720.80
5.5.270.0030.05320.89
5.5.260.0070.04020.93
5.5.250.0030.08320.69
5.5.240.0070.04020.29
5.5.230.0200.05320.31
5.5.220.0170.07020.30
5.5.210.0170.06720.14
5.5.200.0030.04020.24
5.5.190.0000.04020.27
5.5.180.0100.03020.16
5.5.160.0100.03720.23
5.5.150.0130.06020.25
5.5.140.0170.03320.23
5.5.130.0170.06720.25
5.5.120.0030.04720.15
5.5.110.0100.07720.23
5.5.100.0300.06020.10
5.5.90.0070.03720.09
5.5.80.0000.04320.17
5.5.70.0070.08320.09
5.5.60.0100.03720.16
5.5.50.0130.06320.10
5.5.40.0070.06020.15
5.5.30.0070.04720.05
5.5.20.0030.05720.04
5.5.10.0000.04320.04
5.5.00.0030.08320.03
5.4.450.0070.04719.38
5.4.440.0070.03719.35
5.4.430.0070.03719.29
5.4.420.0070.05719.42
5.4.410.0070.06719.24
5.4.400.0030.07018.98
5.4.390.0000.04319.06
5.4.380.0000.06018.83
5.4.370.0030.07719.02
5.4.360.0000.05318.98
5.4.350.0030.05318.81
5.4.340.0070.03319.05
5.4.320.0030.05719.14
5.4.310.0200.06318.96
5.4.300.0170.05319.06
5.4.290.0030.04019.12
5.4.280.0100.07318.98
5.4.270.0100.05718.78
5.4.260.0030.04318.98
5.4.250.0070.06019.14
5.4.240.0030.06318.75
5.4.230.0200.05319.02
5.4.220.0030.04318.80
5.4.210.0070.03718.93
5.4.200.0000.07018.80
5.4.190.0070.08018.89
5.4.180.0100.07719.05
5.4.170.0100.06319.13
5.4.160.0170.03319.05
5.4.150.0100.03719.09
5.4.140.0030.06716.32
5.4.130.0130.05316.44
5.4.120.0000.07316.44
5.4.110.0000.04016.38
5.4.100.0130.03316.43
5.4.90.0070.06316.43
5.4.80.0200.06016.24
5.4.70.0070.07016.30
5.4.60.0100.06316.38
5.4.50.0030.03016.23
5.4.40.0000.04316.26
5.4.30.0070.07016.33
5.4.20.0100.03016.18
5.4.10.0070.03316.29
5.4.00.0000.03315.82
5.3.290.0100.07314.66
5.3.280.0300.02314.59
5.3.270.0070.04014.45
5.3.260.0030.06714.61
5.3.250.0100.07714.57
5.3.240.0130.06314.63
5.3.230.0070.05314.60
5.3.220.0030.07714.59
5.3.210.0100.05714.54
5.3.200.0070.04014.52
5.3.190.0030.04014.56
5.3.180.0100.03014.54
5.3.170.0100.06714.56
5.3.160.0100.06314.56
5.3.150.0070.06714.39
5.3.140.0070.04014.40
5.3.130.0070.04314.55
5.3.120.0030.04014.57
5.3.110.0030.06314.42
5.3.100.0000.04014.06
5.3.90.0000.04013.99
5.3.80.0030.04014.01
5.3.70.0070.03313.94
5.3.60.0030.04313.95
5.3.50.0000.03313.96
5.3.40.0000.04313.96
5.3.30.0030.03713.89
5.3.20.0000.03713.69
5.3.10.0000.03713.66
5.3.00.0070.02713.41

preferences:
38.11 ms | 401 KiB | 5 Q