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'); 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.0090.00618.39
8.3.50.0100.01022.04
8.3.40.0120.00319.05
8.3.30.0070.00719.35
8.3.20.0040.00420.33
8.3.10.0000.00822.13
8.3.00.0000.00722.45
8.2.180.0070.00716.88
8.2.170.0120.00322.96
8.2.160.0140.00021.18
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0040.01126.16
8.2.120.0040.00418.00
8.2.110.0070.00322.30
8.2.100.0090.00320.08
8.2.90.0050.00319.32
8.2.80.0080.00017.97
8.2.70.0090.00017.99
8.2.60.0060.00318.05
8.2.50.0050.00318.07
8.2.40.0080.00018.34
8.2.30.0050.00218.28
8.2.20.0000.00718.26
8.2.10.0040.00418.02
8.2.00.0080.00018.23
8.1.280.0030.01025.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.80
8.1.230.0070.00419.14
8.1.220.0080.00017.91
8.1.210.0040.00418.77
8.1.200.0060.00317.60
8.1.190.0040.00417.78
8.1.180.0000.00818.84
8.1.170.0000.00818.76
8.1.160.0030.00522.09
8.1.150.0000.00719.03
8.1.140.0000.00717.60
8.1.130.0030.00317.92
8.1.120.0040.00417.71
8.1.110.0030.00617.63
8.1.100.0000.00717.57
8.1.90.0000.00717.59
8.1.80.0030.00417.60
8.1.70.0050.00317.66
8.1.60.0030.00817.75
8.1.50.0000.00717.64
8.1.40.0040.00417.63
8.1.30.0030.00517.80
8.1.20.0040.00417.77
8.1.10.0060.00317.77
8.1.00.0000.00717.77
8.0.300.0080.00018.77
8.0.290.0040.00417.28
8.0.280.0030.00318.59
8.0.270.0070.00017.21
8.0.260.0030.00318.50
8.0.250.0000.00717.23
8.0.240.0070.00017.25
8.0.230.0030.00317.39
8.0.220.0040.00417.32
8.0.210.0000.00717.18
8.0.200.0030.00317.31
8.0.190.0000.00717.29
8.0.180.0030.00517.30
8.0.170.0070.00017.24
8.0.160.0000.00717.34
8.0.150.0000.00717.31
8.0.140.0070.00017.13
8.0.130.0090.00013.73
8.0.120.0030.00617.27
8.0.110.0040.00417.26
8.0.100.0000.00717.29
8.0.90.0000.00717.31
8.0.80.0110.00617.26
8.0.70.0020.00517.11
8.0.60.0030.00317.13
8.0.50.0000.00717.34
8.0.30.0070.01217.26
8.0.20.0180.00217.40
8.0.10.0000.00717.18
8.0.00.0110.00717.12
7.4.330.0050.00015.00
7.4.320.0030.00316.98
7.4.300.0000.00716.96
7.4.290.0000.00816.76
7.4.280.0030.00316.96
7.4.270.0000.00816.92
7.4.260.0050.00316.90
7.4.250.0080.00016.86
7.4.240.0040.00416.86
7.4.230.0050.00316.70
7.4.220.0120.00616.87
7.4.210.0060.00816.93
7.4.200.0030.00316.59
7.4.190.0060.00317.03
7.4.160.0110.00616.98
7.4.150.0080.01317.40
7.4.140.0090.00817.86
7.4.130.0070.01016.82
7.4.120.0060.01116.87
7.4.110.0110.01416.85
7.4.100.0170.00716.76
7.4.90.0060.01216.89
7.4.80.0080.00819.39
7.4.70.0060.01216.86
7.4.60.0180.00316.75
7.4.50.0060.00316.55
7.4.40.0090.00622.77
7.4.30.0050.01016.82
7.4.00.0070.01015.14
7.3.330.0040.00413.52
7.3.320.0020.00213.55
7.3.310.0050.00216.59
7.3.300.0000.00716.65
7.3.290.0060.00916.63
7.3.280.0110.00516.65
7.3.270.0100.00717.40
7.3.260.0060.01216.59
7.3.250.0070.01016.69
7.3.240.0120.00916.71
7.3.230.0030.01316.71
7.3.210.0150.00916.76
7.3.200.0140.00919.39
7.3.190.0190.00316.70
7.3.180.0070.01416.74
7.3.170.0090.00916.66
7.3.160.0080.00816.76
7.3.120.0060.00915.20
7.3.00.0140.00317.02
7.2.330.0070.01016.77
7.2.320.0110.00616.85
7.2.310.0160.00616.92
7.2.300.0120.00917.02
7.2.290.0140.00716.86
7.2.130.0070.00717.17
7.2.120.0060.00616.99
7.2.110.0070.00817.03
7.2.100.0080.00816.85
7.2.90.0070.00717.13
7.2.80.0050.00816.97
7.2.70.0070.00817.15
7.2.60.0060.00717.04
7.2.50.0050.00717.12
7.2.40.0110.00317.11
7.2.30.0020.01117.35
7.2.20.0050.00717.14
7.2.10.0030.01117.13
7.2.00.0080.00718.15
7.1.250.0030.00915.89
7.1.240.0050.00716.05
7.1.230.0040.00816.04
7.1.220.0050.00815.97
7.1.210.0050.00916.04
7.1.200.0060.00616.05
7.1.190.0050.00716.17
7.1.180.0070.00615.99
7.1.170.0070.00516.11
7.1.160.0070.00616.21
7.1.150.0060.00916.21
7.1.140.0080.00315.88
7.1.130.0040.00715.91
7.1.120.0050.00515.88
7.1.110.0030.00716.17
7.1.100.0050.00816.86
7.1.90.0060.00715.96
7.1.80.0030.00916.09
7.1.70.0040.00616.40
7.1.60.0010.01417.31
7.1.50.0030.01216.50
7.1.40.0080.00316.14
7.1.30.0050.00516.15
7.1.20.0020.00716.07
7.1.10.0080.00616.03
7.1.00.0050.03318.24
7.0.330.0120.00015.32
7.0.320.0060.00315.61
7.0.310.0070.00315.60
7.0.300.0060.00715.50
7.0.290.0030.00515.57
7.0.280.0050.00515.66
7.0.270.0010.00715.52
7.0.260.0070.00615.65
7.0.250.0080.00515.57
7.0.240.0050.00515.76
7.0.230.0050.01015.67
7.0.220.0000.00715.77
7.0.210.0030.00815.69
7.0.200.0080.00216.13
7.0.190.0060.00315.67
7.0.180.0070.00715.61
7.0.170.0040.00715.61
7.0.160.0030.01015.67
7.0.150.0060.00615.50
7.0.140.0030.03017.83
7.0.130.0020.01215.69
7.0.120.0050.00715.61
7.0.110.0030.00715.79
7.0.100.0060.00815.57
7.0.90.0050.00615.66
7.0.80.0060.00615.76
7.0.70.0060.00515.62
7.0.60.0090.02617.06
7.0.50.0050.02416.48
7.0.40.0080.02915.71
7.0.30.0140.02915.90
7.0.20.0140.03115.93
7.0.10.0050.02415.68
7.0.00.0070.02715.69
5.6.380.0030.01014.72
5.6.370.0070.00614.45
5.6.360.0030.00714.62
5.6.350.0050.00514.75
5.6.340.0040.01014.57
5.6.330.0080.00714.35
5.6.320.0100.00514.21
5.6.310.0080.00314.36
5.6.300.0050.00914.56
5.6.290.0040.00314.38
5.6.280.0050.02816.59
5.6.270.0080.00314.41
5.6.260.0080.00514.48
5.6.250.0060.00414.42
5.6.240.0040.00714.38
5.6.230.0000.01014.60
5.6.220.0050.00614.44
5.6.210.0090.01316.43
5.6.200.0090.03115.65
5.6.190.0050.02116.57
5.6.180.0170.01716.51
5.6.170.0120.03016.46
5.6.160.0040.02616.36
5.6.150.0040.02115.74
5.6.140.0060.01915.78
5.6.130.0060.02515.66
5.6.120.0050.01616.59
5.6.110.0080.03116.66
5.6.100.0020.02016.59
5.6.90.0070.03116.64
5.6.80.0100.02716.47
5.6.70.0050.00814.52
5.6.60.0070.00714.54
5.6.50.0050.00614.57
5.6.40.0050.00514.43
5.6.30.0060.00614.61
5.6.20.0050.01014.34
5.6.10.0050.00914.50
5.6.00.0010.00814.51
5.5.380.0030.00511.19
5.5.370.0080.00011.21
5.5.360.0010.00711.26
5.5.350.0120.02714.45
5.5.340.0070.01913.43
5.5.330.0040.02014.29
5.5.320.0030.01814.32
5.5.310.0100.02214.09
5.5.300.0040.02713.63
5.5.290.0060.01613.51
5.5.280.0020.03414.69
5.5.270.0050.01914.47
5.5.260.0050.02014.52
5.5.250.0090.03014.32
5.5.240.0040.02514.27
5.5.230.0040.00511.15
5.5.220.0020.00611.42
5.5.210.0030.00711.23
5.5.200.0050.00511.17
5.5.190.0030.00511.06
5.5.180.0060.00011.29
5.5.170.0020.01012.69
5.5.160.0060.00511.22
5.5.150.0050.00511.29
5.5.140.0030.00511.23
5.5.130.0010.01011.31
5.5.120.0020.00811.24
5.5.110.0080.00011.26
5.5.100.0030.00511.20
5.5.90.0030.00711.11
5.5.80.0070.00211.21
5.5.70.0030.00711.32
5.5.60.0050.00311.13
5.5.50.0060.00511.31
5.5.40.0000.00711.29
5.5.30.0060.00511.20
5.5.20.0000.00711.44
5.5.10.0020.00711.13
5.5.00.0020.00911.12
5.4.450.0230.02213.94
5.4.440.0070.03114.12
5.4.430.0080.02314.11
5.4.420.0040.02614.06
5.4.410.0020.02613.83
5.4.400.0470.00013.63
5.4.390.0570.00513.64
5.4.380.0110.02313.67
5.4.370.0100.02113.66
5.4.360.0070.02413.61
5.4.350.0100.02113.57
5.4.340.0110.02013.59
5.4.330.0080.00011.38
5.4.320.0040.01511.59
5.4.310.0050.02411.61
5.4.300.0020.01811.60
5.4.290.0050.01611.71
5.4.280.0040.01611.47
5.4.270.0020.01811.56
5.4.260.0030.01811.67
5.4.250.0070.01811.61
5.4.240.0020.01711.66
5.4.230.0040.01811.58
5.4.220.0060.01511.60
5.4.210.0040.01711.58
5.4.200.0080.02713.68
5.4.190.0070.01913.70
5.4.180.0070.02613.75
5.4.170.0070.02713.75
5.4.160.0060.02613.68
5.4.150.0050.02213.72
5.4.140.0040.02812.90
5.4.130.0080.02112.92
5.4.120.0050.02712.80
5.4.110.0030.02312.99
5.4.100.0070.01712.80
5.4.90.0060.01812.81
5.4.80.0030.03212.97
5.4.70.0060.02112.87
5.4.60.0080.01812.97
5.4.50.0070.02312.88
5.4.40.0060.02512.83
5.4.30.0080.02112.80
5.4.20.0030.02712.83
5.4.10.0080.01912.80
5.4.00.0060.01812.74
5.3.290.0030.02011.46
5.3.280.0040.01711.44
5.3.270.0050.01812.03
5.3.260.0040.02312.06
5.3.250.0070.01912.09
5.3.240.0020.02712.03
5.3.230.0030.02212.03
5.3.220.0040.02712.05
5.3.210.0060.02012.05
5.3.200.0030.02112.02
5.3.190.0070.02312.07
5.3.180.0030.02312.13
5.3.170.0050.02112.10
5.3.160.0070.02212.13
5.3.150.0110.01411.99
5.3.140.0060.01912.10
5.3.130.0040.02712.09
5.3.120.0070.02012.15
5.3.110.0030.02211.99
5.3.100.0060.01811.90
5.3.90.0020.02311.86
5.3.80.0080.01511.84
5.3.70.0060.01911.81
5.3.60.0040.02211.93
5.3.50.0040.02011.82
5.3.40.0050.02311.84
5.3.30.0050.02111.85
5.3.20.0060.02211.72
5.3.10.0040.02011.74
5.3.00.0060.02111.68
5.2.170.0040.01710.87
5.2.160.0080.01510.93
5.2.150.0030.02310.91
5.2.140.0070.01610.91
5.2.130.0050.01610.92
5.2.120.0050.01510.83
5.2.110.0050.01510.92
5.2.100.0010.02510.83
5.2.90.0090.01110.92
5.2.80.0070.01410.85
5.2.70.0030.02310.89
5.2.60.0040.02310.88
5.2.50.0050.02010.82
5.2.40.0060.01910.83
5.2.30.0050.01610.85
5.2.20.0040.01610.80
5.2.10.0080.01810.83
5.2.00.0060.01610.83
5.1.60.0000.01610.57
5.1.50.0020.01610.52
5.1.40.0030.01410.54
5.1.30.0040.01610.65
5.1.20.0060.01610.63
5.1.10.0050.01410.56
5.1.00.0040.01410.53
5.0.50.0040.00910.12
5.0.40.0030.01710.00
5.0.30.0040.0239.96
5.0.20.0020.0149.91
5.0.10.0030.0159.91
5.0.00.0030.0179.90
4.4.90.0020.0099.62
4.4.80.0010.0109.62
4.4.70.0030.0089.62
4.4.60.0020.0119.62
4.4.50.0010.0139.62
4.4.40.0020.0149.62
4.4.30.0030.0099.62
4.4.20.0010.0119.62
4.4.10.0020.0099.62
4.4.00.0050.0109.62
4.3.110.0020.0159.16
4.3.100.0030.0139.11
4.3.90.0040.0079.13
4.3.80.0030.0159.11
4.3.70.0050.0109.10
4.3.60.0040.0089.08
4.3.50.0030.0109.11
4.3.40.0000.0199.10
4.3.30.0030.0108.69
4.3.20.0020.0118.69
4.3.10.0010.0128.68
4.3.00.0030.0088.68

preferences:
46.79 ms | 401 KiB | 5 Q