3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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+$/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.0140.00718.30
8.3.50.0060.01322.05
8.3.40.0110.00719.05
8.3.30.0120.00919.03
8.3.20.0080.00019.14
8.3.10.0080.00021.12
8.3.00.0060.00318.80
8.2.180.0040.01116.75
8.2.170.0110.00422.96
8.2.160.0100.01020.30
8.2.150.0120.00624.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00421.25
8.2.110.0090.00020.35
8.2.100.0030.00818.16
8.2.90.0040.00419.30
8.2.80.0070.00319.39
8.2.70.0000.00918.00
8.2.60.0000.00818.17
8.2.50.0030.00618.13
8.2.40.0060.00318.22
8.2.30.0020.00521.30
8.2.20.0040.00417.99
8.2.10.0060.00318.02
8.2.00.0060.00318.14
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0090.00022.53
8.1.230.0000.01220.98
8.1.220.0040.00418.77
8.1.210.0030.00519.04
8.1.200.0050.00517.60
8.1.190.0000.00817.78
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0080.00019.06
8.1.150.0000.00718.77
8.1.140.0060.00317.64
8.1.130.0030.00317.91
8.1.120.0040.00417.68
8.1.110.0050.00317.66
8.1.100.0050.00217.71
8.1.90.0000.00717.59
8.1.80.0040.00417.53
8.1.70.0070.00017.56
8.1.60.0030.00617.76
8.1.50.0040.00417.71
8.1.40.0060.00317.61
8.1.30.0040.00417.89
8.1.20.0040.00417.79
8.1.10.0040.00417.80
8.1.00.0040.00417.75
8.0.300.0020.00520.03
8.0.290.0000.00717.40
8.0.280.0000.00718.52
8.0.270.0040.00417.39
8.0.260.0040.00417.09
8.0.250.0040.00417.21
8.0.240.0000.00917.29
8.0.230.0030.00317.35
8.0.220.0000.00717.18
8.0.210.0000.00717.21
8.0.200.0030.00317.41
8.0.190.0000.00717.37
8.0.180.0000.00717.20
8.0.170.0060.00317.34
8.0.160.0080.00017.25
8.0.150.0050.00217.23
8.0.140.0000.00717.29
8.0.130.0000.00513.71
8.0.120.0030.00517.27
8.0.110.0040.00417.11
8.0.100.0030.00517.17
8.0.90.0030.00517.29
8.0.80.0060.00917.30
8.0.70.0040.00417.33
8.0.60.0000.00717.23
8.0.50.0040.00417.14
8.0.30.0120.00617.31
8.0.20.0110.01617.40
8.0.10.0040.00417.23
8.0.00.0090.01716.99
7.4.330.0000.00516.68
7.4.320.0030.00316.75
7.4.300.0030.00316.73
7.4.290.0000.00816.76
7.4.280.0070.00016.82
7.4.270.0070.00016.90
7.4.260.0000.00613.59
7.4.250.0050.00316.70
7.4.240.0030.00316.95
7.4.230.0000.00716.91
7.4.220.0130.01516.89
7.4.210.0080.00816.93
7.4.200.0030.00316.73
7.4.190.0030.00316.67
7.4.160.0170.00716.85
7.4.150.0070.01017.40
7.4.140.0130.00817.86
7.4.130.0110.00916.74
7.4.120.0090.01016.81
7.4.110.0100.00716.76
7.4.100.0150.00316.86
7.4.90.0110.00816.86
7.4.80.0090.00919.39
7.4.70.0160.00616.86
7.4.60.0100.00916.84
7.4.50.0060.00316.75
7.4.40.0160.00022.77
7.4.30.0090.01016.79
7.4.00.0080.00815.28
7.3.330.0070.00013.56
7.3.320.0050.00313.49
7.3.310.0000.00716.73
7.3.300.0030.00316.65
7.3.290.0090.01016.63
7.3.280.0070.00816.68
7.3.270.0110.00517.40
7.3.260.0100.01018.24
7.3.250.0090.00916.68
7.3.240.0090.00616.77
7.3.230.0160.00316.61
7.3.210.0070.01016.74
7.3.200.0040.01419.39
7.3.190.0110.00816.80
7.3.180.0110.00516.68
7.3.170.0040.01116.85
7.3.160.0100.00716.59
7.3.120.0050.01115.07
7.3.110.0070.00815.10
7.3.100.0100.00715.07
7.3.90.0030.01014.98
7.3.80.0050.01014.97
7.3.70.0070.00615.09
7.3.60.0050.00815.00
7.3.50.0030.01115.06
7.3.40.0090.00315.09
7.3.30.0050.00815.03
7.3.20.0080.00516.95
7.3.10.0060.00916.97
7.3.00.0080.00616.95
7.2.330.0100.00716.99
7.2.320.0090.00916.95
7.2.310.0140.00316.88
7.2.300.0030.01317.02
7.2.290.0160.00016.81
7.2.250.0070.01115.34
7.2.240.0060.01115.30
7.2.230.0050.01115.21
7.2.220.0020.01415.31
7.2.210.0100.00315.35
7.2.200.0020.01215.21
7.2.190.0110.00815.27
7.2.180.0030.00815.18
7.2.170.0080.00815.33
7.2.160.0000.01115.00
7.2.150.0040.01117.06
7.2.140.0070.00717.09
7.2.130.0130.00317.23
7.2.120.0060.00617.29
7.2.110.0070.01117.16
7.2.100.0090.00616.99
7.2.90.0030.00717.22
7.2.80.0030.01017.14
7.2.70.0030.01016.94
7.2.60.0070.00317.12
7.2.50.0040.01116.91
7.2.40.0060.00917.16
7.2.30.0040.01416.98
7.2.20.0100.00317.18
7.2.10.0040.00717.18
7.2.00.0050.01118.51
7.1.330.0060.00916.10
7.1.320.0020.01216.08
7.1.310.0050.00916.09
7.1.300.0030.01016.08
7.1.290.0030.01015.98
7.1.280.0030.00815.87
7.1.270.0040.00615.99
7.1.260.0040.00616.12
7.1.250.0090.00916.21
7.1.240.0030.01016.11
7.1.230.0030.01015.91
7.1.220.0070.00416.04
7.1.210.0000.01316.10
7.1.200.0100.00715.89
7.1.190.0000.01115.72
7.1.180.0070.00415.88
7.1.170.0040.00915.88
7.1.160.0070.00715.98
7.1.150.0060.00616.11
7.1.140.0000.01416.20
7.1.130.0090.00615.89
7.1.120.0030.01315.85
7.1.110.0030.01316.13
7.1.100.0040.00817.07
7.1.90.0090.00615.92
7.1.80.0110.00316.07
7.1.70.0040.00916.68
7.1.60.0070.01117.54
7.1.50.0080.01116.72
7.1.40.0090.00615.57
7.1.30.0060.00916.05
7.1.20.0030.01615.91
7.1.10.0040.01115.80
7.1.00.0020.02319.18
7.0.330.0030.00915.54
7.0.320.0070.01015.51
7.0.310.0100.00315.54
7.0.300.0000.00815.78
7.0.290.0060.00915.73
7.0.280.0000.01515.71
7.0.270.0030.01215.46
7.0.260.0030.01015.54
7.0.250.0030.01015.45
7.0.240.0090.00615.84
7.0.230.0100.00015.48
7.0.220.0070.01015.44
7.0.210.0030.01315.59
7.0.200.0030.00816.40
7.0.190.0060.00315.77
7.0.180.0100.00715.57
7.0.170.0130.00615.33
7.0.160.0060.00615.50
7.0.150.0030.00915.77
7.0.140.0080.03518.75
7.0.130.0030.00915.64
7.0.120.0070.00715.59
7.0.110.0030.00715.76
7.0.100.0130.03817.67
7.0.90.0050.04317.65
7.0.80.0090.02217.70
7.0.70.0050.02717.81
7.0.60.0150.02017.78
7.0.50.0050.03118.08
7.0.40.0070.02316.71
7.0.30.0030.03516.94
7.0.20.0030.03316.81
7.0.10.0020.02616.71
7.0.00.0050.02516.99
5.6.400.0110.00714.37
5.6.390.0060.00614.71
5.6.380.0030.01414.84
5.6.370.0110.00314.60
5.6.360.0060.00614.29
5.6.350.0030.01114.31
5.6.340.0040.01214.16
5.6.330.0060.00914.50
5.6.320.0000.01414.43
5.6.310.0070.01114.54
5.6.300.0030.01414.20
5.6.290.0130.00314.86
5.6.280.0060.04017.62
5.6.270.0070.00714.70
5.6.260.0070.00714.34
5.6.250.0090.04017.58
5.6.240.0030.04517.57
5.6.230.0040.02717.49
5.6.220.0020.02717.56
5.6.210.0070.02717.56
5.6.200.0020.02717.71
5.6.190.0020.02717.88
5.6.180.0050.02817.81
5.6.170.0060.03017.89
5.6.160.0050.02617.74
5.6.150.0070.02217.78
5.6.140.0050.02717.70
5.6.130.0050.02517.80
5.6.120.0060.02017.78
5.6.110.0030.03317.82
5.6.100.0060.02317.85
5.6.90.0020.02817.76
5.6.80.0080.01817.51
5.6.70.0030.02517.35
5.6.60.0060.02317.41
5.6.50.0080.02517.38
5.6.40.0080.01817.30
5.6.30.0020.04417.41
5.6.20.0030.04317.32
5.6.10.0030.03717.44
5.6.00.0020.04217.47
5.5.380.0050.04217.54
5.5.370.0060.03617.45
5.5.360.0070.02317.50
5.5.350.0100.03917.37
5.5.340.0050.03917.44
5.5.330.0050.02817.60
5.5.320.0030.02817.71
5.5.310.0080.02317.50
5.5.300.0020.02417.63
5.5.290.0050.02417.72
5.5.280.0120.01717.62
5.5.270.0030.03017.68
5.5.260.0070.02317.65
5.5.250.0050.02217.48
5.5.240.0100.01817.17
5.5.230.0030.02517.36
5.5.220.0020.02817.22
5.5.210.0080.02317.28
5.5.200.0060.02317.31
5.5.190.0070.04217.17
5.5.180.0080.03717.36
5.5.170.0030.01014.56
5.5.160.0060.04317.15
5.5.150.0060.02817.30
5.5.140.0030.04417.41
5.5.130.0040.02617.29
5.5.120.0130.03717.37
5.5.110.0030.04517.28
5.5.100.0080.04517.09
5.5.90.0080.04117.26
5.5.80.0070.04317.21
5.5.70.0100.03817.13
5.5.60.0100.04017.20
5.5.50.0040.04617.22
5.5.40.0060.03917.25
5.5.30.0050.02917.23
5.5.20.0070.04217.22
5.5.10.0050.04217.12
5.5.00.0020.04917.20
5.4.450.0060.03015.98
5.4.440.0000.02515.84
5.4.430.0030.02515.98
5.4.420.0050.02316.01
5.4.410.0000.03415.79
5.4.400.0100.01815.80
5.4.390.0020.02415.78
5.4.380.0010.02515.80
5.4.370.0070.02015.84
5.4.360.0060.02315.90
5.4.350.0090.01815.84
5.4.340.0090.03515.78
5.4.330.0040.00712.57
5.4.320.0030.04215.77
5.4.310.0060.03615.90
5.4.300.0050.03315.84
5.4.290.0070.04015.90
5.4.280.0070.04015.76
5.4.270.0140.03515.82
5.4.260.0110.03815.84
5.4.250.0090.02415.78
5.4.240.0060.04115.84
5.4.230.0080.04115.77
5.4.220.0060.04315.69
5.4.210.0030.04115.75
5.4.200.0080.03015.80
5.4.190.0110.03715.81
5.4.180.0020.04615.83
5.4.170.0050.02715.84
5.4.160.0080.03815.85
5.4.150.0070.03715.79
5.4.140.0100.03314.42
5.4.130.0020.04314.41
5.4.120.0070.03914.43
5.4.110.0050.03714.54
5.4.100.0050.04214.50
5.4.90.0070.03714.45
5.4.80.0080.03814.42
5.4.70.0020.02914.43
5.4.60.0030.04014.45
5.4.50.0040.03714.46
5.4.40.0080.03714.52
5.4.30.0090.03714.43
5.4.20.0030.04114.42
5.4.10.0120.03514.39
5.4.00.0070.03814.14
5.3.290.0050.03513.59
5.3.280.0040.03413.58
5.3.270.0030.04613.56
5.3.260.0070.04213.57
5.3.250.0070.03513.54
5.3.240.0050.03813.52
5.3.230.0070.03913.54
5.3.220.0050.04313.57
5.3.210.0050.04113.56
5.3.200.0090.03713.57
5.3.190.0030.04013.51
5.3.180.0090.03813.49
5.3.170.0070.04313.48
5.3.160.0050.04113.55
5.3.150.0070.04013.51
5.3.140.0100.03513.55
5.3.130.0100.04213.52
5.3.120.0030.04113.51
5.3.110.0090.03813.54
5.3.100.0040.02613.27
5.3.90.0050.04113.29
5.3.80.0050.04013.17
5.3.70.0070.03913.29
5.3.60.0030.02113.28
5.3.50.0060.02713.26
5.3.40.0050.02313.25
5.3.30.0070.03813.24
5.3.20.0020.03713.11
5.3.10.0050.03513.07
5.3.00.0100.03513.07
5.2.170.0070.06011.14
5.2.160.0030.05010.99
5.2.150.0100.05710.93
5.2.140.0030.05311.01
5.2.130.0070.05711.14
5.2.120.0070.06010.92
5.2.110.0070.06010.94
5.2.100.0100.05711.02
5.2.90.0030.05710.96
5.2.80.0100.05710.90
5.2.70.0130.05311.07
5.2.60.0070.06011.09
5.2.50.0030.06311.09
5.2.40.0070.05710.99
5.2.30.0100.04710.99
5.2.20.0030.05011.01
5.2.10.0070.04310.77
5.2.00.0130.05010.70
5.1.60.0070.05010.02
5.1.50.0070.05010.02
5.1.40.0000.03010.02
5.1.30.0070.05010.28
5.1.20.0030.05710.36
5.1.10.0030.05710.16
5.1.00.0030.05310.12
5.0.50.0070.0339.36
5.0.40.0130.0308.38
5.0.30.0070.0438.30
5.0.20.0070.0338.39
5.0.10.0000.0408.08
5.0.00.0070.0438.00
4.4.90.0030.0409.36
4.4.80.0000.0209.36
4.4.70.0030.0379.36
4.4.60.0000.0209.36
4.4.50.0000.0339.36
4.4.40.0030.0579.36
4.4.30.0070.0309.36
4.4.20.0000.0379.36
4.4.10.0030.0339.36
4.4.00.0030.0339.36
4.3.110.0030.0235.65
4.3.100.0100.0236.84
4.3.90.0000.0305.79
4.3.80.0070.0335.81
4.3.70.0070.0275.77
4.3.60.0200.0135.81
4.3.50.0030.0335.67
4.3.40.0030.0435.69
4.3.30.0000.0275.30
4.3.20.0100.0235.30
4.3.10.0030.0305.30
4.3.00.0030.0305.30

preferences:
45.14 ms | 401 KiB | 5 Q