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); $tests = array(); $test_string = mb_convert_encoding('&#xAC00;&#xAC01;&#x0BA8;', 'UTF-8', 'HTML-ENTITIES'); $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)) . PHP_EOL; 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.0070.01418.55
8.3.50.0130.00722.24
8.3.40.0110.01119.09
8.3.30.0070.01119.27
8.3.20.0060.00319.12
8.3.10.0050.00320.81
8.3.00.0050.00520.68
8.2.180.0140.00718.67
8.2.170.0150.00022.96
8.2.160.0170.00020.36
8.2.150.0150.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0000.00821.13
8.2.110.0090.00020.22
8.2.100.0140.00018.28
8.2.90.0000.00819.33
8.2.80.0080.00019.32
8.2.70.0040.00417.75
8.2.60.0000.00818.16
8.2.50.0000.00918.07
8.2.40.0040.00418.34
8.2.30.0070.00019.36
8.2.20.0000.00818.17
8.2.10.0000.00818.22
8.2.00.0090.00318.19
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00622.72
8.1.230.0000.01220.92
8.1.220.0040.00418.77
8.1.210.0000.00818.96
8.1.200.0060.00317.50
8.1.190.0030.00517.66
8.1.180.0030.00618.10
8.1.170.0030.00618.77
8.1.160.0070.00018.94
8.1.150.0000.00818.90
8.1.140.0070.00317.64
8.1.130.0000.00717.81
8.1.120.0050.00317.56
8.1.110.0040.00417.56
8.1.100.0040.00417.71
8.1.90.0000.00717.55
8.1.80.0030.00317.65
8.1.70.0000.00717.49
8.1.60.0060.00317.70
8.1.50.0040.00417.57
8.1.40.0000.00817.73
8.1.30.0050.00317.75
8.1.20.0080.00017.85
8.1.10.0000.00717.77
8.1.00.0050.00317.73
8.0.300.0080.00020.05
8.0.290.0070.00017.40
8.0.280.0070.00018.58
8.0.270.0000.00717.33
8.0.260.0030.00317.19
8.0.250.0000.00717.36
8.0.240.0040.00417.23
8.0.230.0070.00017.22
8.0.220.0070.00017.24
8.0.210.0000.00817.27
8.0.200.0030.00317.30
8.0.190.0040.00417.18
8.0.180.0040.00417.32
8.0.170.0000.00717.22
8.0.160.0000.00717.25
8.0.150.0070.00017.18
8.0.140.0000.00717.25
8.0.130.0050.00013.58
8.0.120.0040.00417.14
8.0.110.0040.00417.16
8.0.100.0000.00717.13
8.0.90.0040.00417.18
8.0.80.0110.00317.30
8.0.70.0000.00717.17
8.0.60.0060.00317.34
8.0.50.0000.00717.32
8.0.30.0120.01117.35
8.0.20.0090.01017.40
8.0.10.0000.00717.31
8.0.00.0140.00617.07
7.4.330.0000.00616.68
7.4.320.0040.00416.83
7.4.300.0060.00016.94
7.4.290.0000.00716.91
7.4.280.0030.00316.92
7.4.270.0040.00416.91
7.4.260.0000.00613.55
7.4.250.0040.00416.79
7.4.240.0070.00016.83
7.4.230.0040.00416.75
7.4.220.0140.01016.82
7.4.210.0070.00816.87
7.4.200.0030.00316.74
7.4.190.0000.00717.04
7.4.160.0000.01516.82
7.4.150.0150.00317.40
7.4.140.0140.00817.86
7.4.130.0150.00516.84
7.4.120.0090.01116.70
7.4.110.0090.00916.95
7.4.100.0070.01016.73
7.4.90.0090.01016.75
7.4.80.0110.00719.39
7.4.70.0140.00716.79
7.4.60.0060.01216.65
7.4.50.0030.00616.67
7.4.40.0110.00422.77
7.4.30.0100.01016.59
7.4.00.0080.00615.19
7.3.330.0040.00413.55
7.3.320.0030.00313.57
7.3.310.0070.00016.69
7.3.300.0040.00416.53
7.3.290.0110.00316.62
7.3.280.0070.01116.69
7.3.270.0030.01417.40
7.3.260.0150.00918.24
7.3.250.0080.00816.68
7.3.240.0130.00916.74
7.3.230.0120.00916.59
7.3.210.0160.00616.70
7.3.200.0070.01019.39
7.3.190.0090.00916.68
7.3.180.0070.01116.63
7.3.170.0030.01316.73
7.3.160.0130.00316.70
7.3.120.0050.01115.09
7.3.110.0100.00715.33
7.3.100.0120.00015.38
7.3.90.0060.00315.34
7.3.80.0030.01015.15
7.3.70.0030.00715.23
7.3.60.0040.01115.26
7.3.50.0040.01115.08
7.3.40.0070.00715.23
7.3.30.0070.01014.86
7.3.20.0070.00316.98
7.3.10.0110.00916.75
7.3.00.0120.01016.73
7.2.330.0030.01517.02
7.2.320.0130.01016.82
7.2.310.0050.01816.96
7.2.300.0100.00616.84
7.2.290.0160.00016.89
7.2.250.0060.01315.34
7.2.240.0090.00915.32
7.2.230.0070.01115.38
7.2.220.0040.01415.33
7.2.210.0030.01315.52
7.2.200.0060.00615.23
7.2.190.0140.00315.13
7.2.180.0030.00615.10
7.2.170.0000.01715.39
7.2.130.0120.00716.66
7.2.120.0060.01216.95
7.2.110.0180.00416.86
7.2.100.0120.00816.75
7.2.90.0110.01116.92
7.2.80.0070.00916.94
7.2.70.0140.00517.05
7.2.60.0140.00716.90
7.2.50.0150.00516.95
7.2.40.0150.00616.94
7.2.30.0160.00516.97
7.2.20.0080.01416.90
7.2.10.0130.00816.96
7.2.00.0140.00817.77
7.1.330.0030.01315.71
7.1.320.0070.00416.09
7.1.310.0120.00316.23
7.1.300.0090.00016.12
7.1.290.0000.01215.88
7.1.280.0000.01116.24
7.1.270.0030.00616.09
7.1.260.0040.00715.93
7.1.250.0050.01115.55
7.1.230.0220.00615.83
7.1.220.0130.01015.86
7.1.210.0130.01016.01
7.1.200.0140.00816.16
7.1.190.0230.00515.93
7.1.180.0190.00216.05
7.1.170.0150.00016.11
7.1.160.0210.00315.79
7.1.150.0110.00616.00
7.1.140.0160.00415.98
7.1.130.0190.00015.89
7.1.120.0150.00316.16
7.1.110.0050.01516.00
7.1.100.0300.00716.05
7.1.90.0200.00516.09
7.1.80.0180.00715.86
7.1.70.0110.00616.57
7.1.60.0150.00716.91
7.1.50.0200.00616.68
7.1.40.0160.00616.73
7.1.30.0170.00416.57
7.1.20.0090.00916.76
7.1.10.0180.00516.56
7.1.00.0150.00416.54
7.0.310.0180.01015.41
7.0.300.0180.00515.52
7.0.290.0230.00815.54
7.0.280.0140.00515.39
7.0.270.0200.00315.48
7.0.260.0070.01915.64
7.0.250.0180.00415.34
7.0.240.0170.00815.82
7.0.230.0130.00615.66
7.0.220.0160.00715.81
7.0.210.0110.00715.64
7.0.200.0130.00516.09
7.0.190.0070.00716.22
7.0.180.0110.01016.25
7.0.170.0110.00716.26
7.0.160.0120.00316.13
7.0.150.0190.00616.00
7.0.140.0080.00716.27
7.0.130.0090.00416.24
7.0.120.0040.00716.19
7.0.110.0070.00816.09
7.0.100.0050.00716.05
7.0.90.0100.00516.21
7.0.80.0050.00716.22
7.0.70.0050.00716.09
7.0.60.0090.00116.02
7.0.50.0070.00616.13
7.0.40.0070.00614.32
7.0.30.0040.01014.40
7.0.20.0060.00714.35
7.0.10.0070.00714.34
7.0.00.0060.00714.26
5.6.380.0240.00314.80
5.6.370.0160.00414.79
5.6.360.0160.00414.16
5.6.350.0090.00614.36
5.6.340.0130.00814.56
5.6.330.0250.00014.69
5.6.320.0050.01314.46
5.6.310.0090.00914.52
5.6.300.0110.02617.81
5.6.290.0040.02817.59
5.6.280.0110.02017.67
5.6.270.0110.02417.72
5.6.260.0050.02617.60
5.6.250.0090.02417.67
5.6.240.0120.02217.71
5.6.230.0060.02417.85
5.6.220.0100.02417.58
5.6.210.0110.01817.87
5.6.200.0090.02417.74
5.6.190.0060.03017.77
5.6.180.0120.02217.69
5.6.170.0050.02817.69
5.6.160.0090.02517.63
5.6.150.0110.02317.68
5.6.140.0080.02517.95
5.6.130.0090.02317.83
5.6.120.0050.02617.78
5.6.110.0040.02717.77
5.6.100.0090.02217.76
5.6.90.0090.02317.75
5.6.80.0080.02317.50
5.6.70.0070.02417.30
5.6.60.0060.03117.49
5.6.50.0070.02317.33
5.6.40.0070.02317.52
5.6.30.0120.02117.26
5.6.20.0090.02417.41
5.6.10.0000.03117.36
5.6.00.0090.02217.25
5.5.380.0100.02615.12
5.5.370.0040.02315.12
5.5.360.0060.02515.13
5.5.350.0030.02415.18
5.5.340.0030.02615.41
5.5.330.0050.02815.41
5.5.320.0070.02215.37
5.5.310.0120.02915.36
5.5.300.0180.02615.42
5.5.290.0030.02815.41
5.5.280.0050.02215.42
5.5.270.0090.02015.36
5.5.260.0090.02215.40
5.5.250.0050.02415.15
5.5.240.0030.02415.10
5.5.230.0030.02715.12
5.5.220.0160.02214.95
5.5.210.0050.02315.06
5.5.200.0070.02114.92
5.5.190.0060.02414.99
5.5.180.0060.02615.10
5.5.170.0150.00214.30
5.5.160.0070.01915.08
5.5.150.0080.02115.08
5.5.140.0040.02315.09
5.5.130.0020.02515.10
5.5.120.0010.02615.08
5.5.110.0050.02315.04
5.5.100.0020.02315.02
5.5.90.0040.02215.01
5.5.80.0050.02114.94
5.5.70.0070.02015.03
5.5.60.0050.02914.99
5.5.50.0080.01915.01
5.5.40.0030.02715.00
5.5.30.0050.02115.08
5.5.20.0060.02215.07
5.5.10.0060.02615.00
5.5.00.0050.02215.00
5.4.450.0050.02516.13
5.4.440.0070.02316.06
5.4.430.0070.02116.05
5.4.420.0090.02116.08
5.4.410.0070.02116.01
5.4.400.0030.02515.93
5.4.390.0050.02415.89
5.4.380.0060.02215.86
5.4.370.0050.02315.92
5.4.360.0130.02315.83
5.4.350.0030.02315.89
5.4.340.0070.02115.90
5.4.330.0130.00012.79
5.4.320.0120.01915.81
5.4.310.0030.02315.85
5.4.300.0060.02615.94
5.4.290.0050.02215.96
5.4.280.0060.02215.86
5.4.270.0080.01915.86
5.4.260.0110.02615.89
5.4.250.0100.02415.80
5.4.240.0050.02415.87
5.4.230.0030.02815.85
5.4.220.0040.02315.85
5.4.210.0070.02015.91
5.4.200.0060.03915.91
5.4.190.0070.02715.84
5.4.180.0020.02515.89
5.4.170.0060.02115.85
5.4.160.0050.04215.83
5.4.150.0080.02115.83
5.4.140.0050.02114.67
5.4.130.0070.01914.56
5.4.120.0080.02614.61
5.4.110.0020.02414.68
5.4.100.0030.02114.55
5.4.90.0040.02114.68
5.4.80.0080.01814.62
5.4.70.0050.02114.73
5.4.60.0090.01814.56
5.4.50.0040.02514.70
5.4.40.0090.02314.70
5.4.30.0070.01814.72
5.4.20.0050.04014.61
5.4.10.0030.03114.61
5.4.00.0020.04414.39
5.3.290.0170.02813.88
5.3.280.0040.03813.88
5.3.270.0060.02113.88
5.3.260.0060.02213.88
5.3.250.0070.02013.88
5.3.240.0080.02313.88
5.3.230.0070.02113.88
5.3.220.0070.02113.88
5.3.210.0060.03113.88
5.3.200.0050.02013.88
5.3.190.0040.02413.88
5.3.180.0180.02313.88
5.3.170.0050.02013.88
5.3.160.0020.02513.88
5.3.150.0060.02313.88
5.3.140.0080.03813.88
5.3.130.0060.01813.88
5.3.120.0080.02313.88
5.3.110.0050.03513.88
5.3.100.0040.02513.88
5.3.90.0050.02113.88
5.3.80.0050.02213.88
5.3.70.0050.02013.88
5.3.60.0070.02013.88
5.3.50.0040.02213.88
5.3.40.0020.02513.88
5.3.30.0080.01913.88
5.3.20.0050.01813.88
5.3.10.0110.03413.88
5.3.00.0070.03613.88
5.2.170.0030.01813.88
5.2.160.0060.01913.88
5.2.150.0050.01613.88
5.2.140.0020.01913.88
5.2.130.0050.03213.88
5.2.120.0050.01513.88
5.2.110.0050.03313.88
5.2.100.0060.01613.88
5.2.90.0050.01913.88
5.2.80.0050.03413.88
5.2.70.0040.03113.88
5.2.60.0040.01813.88
5.2.50.0050.03313.88
5.2.40.0100.02113.88
5.2.30.0050.02613.88
5.2.20.0070.01413.88
5.2.10.0080.01413.88
5.2.00.0040.01813.88
5.1.60.0030.01713.88
5.1.50.0020.01713.88
5.1.40.0070.01113.88
5.1.30.0040.01513.88
5.1.20.0040.01813.88
5.1.10.0070.01513.88
5.1.00.0040.01613.88
5.0.50.0050.01713.88
5.0.40.0040.01313.88
5.0.30.0100.01313.88
5.0.20.0070.00813.88
5.0.10.0030.01413.88
5.0.00.0030.02613.88
4.4.90.0000.02213.88
4.4.80.0020.01813.88
4.4.70.0030.01513.88
4.4.60.0000.02413.88
4.4.50.0030.01813.88
4.4.40.0030.01613.88
4.4.30.0030.00813.88
4.4.20.0040.00913.88
4.4.10.0050.00713.88
4.4.00.0040.01813.88
4.3.110.0020.01113.88
4.3.100.0000.01213.88
4.3.90.0020.01013.88
4.3.80.0020.02913.88
4.3.70.0030.01413.88
4.3.60.0030.01513.88
4.3.50.0040.01913.88
4.3.40.0040.01413.88
4.3.30.0020.01113.88
4.3.20.0000.01113.88
4.3.10.0020.01013.88
4.3.00.0020.01113.88

preferences:
63.4 ms | 401 KiB | 5 Q