3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); $tests = array(); $test_string = html_entity_decode('&#x0BA8;&zwnj;&#x0BA8;', ENT_COMPAT, 'UTF-8'); $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.80
8.3.50.0090.01122.18
8.3.40.0070.01319.13
8.3.30.0060.00919.13
8.3.20.0040.00420.29
8.3.10.0080.00022.04
8.3.00.0000.00822.58
8.2.180.0120.00317.13
8.2.170.0100.01022.96
8.2.160.0040.01521.22
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00317.88
8.2.110.0000.01021.00
8.2.100.0120.00018.14
8.2.90.0000.00819.17
8.2.80.0040.00418.16
8.2.70.0030.00618.00
8.2.60.0000.00918.16
8.2.50.0000.00918.07
8.2.40.0080.00018.47
8.2.30.0000.00718.11
8.2.20.0020.00518.19
8.2.10.0040.00418.08
8.2.00.0040.00418.06
8.1.280.0100.00325.92
8.1.270.0060.00322.13
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0110.00021.93
8.1.230.0080.00320.96
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0000.00917.48
8.1.190.0030.00517.65
8.1.180.0040.00418.10
8.1.170.0040.00418.63
8.1.160.0070.00022.03
8.1.150.0040.00418.84
8.1.140.0000.00717.68
8.1.130.0000.00817.94
8.1.120.0000.00717.54
8.1.110.0000.00817.58
8.1.100.0000.00817.58
8.1.90.0000.00717.46
8.1.80.0070.00017.58
8.1.70.0000.00717.61
8.1.60.0030.00617.82
8.1.50.0000.00717.64
8.1.40.0070.00017.61
8.1.30.0080.00017.82
8.1.20.0040.00417.75
8.1.10.0050.00317.82
8.1.00.0050.00317.82
8.0.300.0000.00718.77
8.0.290.0030.00517.29
8.0.280.0040.00418.63
8.0.270.0030.00317.45
8.0.260.0000.00617.10
8.0.250.0070.00017.34
8.0.240.0040.00417.29
8.0.230.0070.00317.21
8.0.220.0050.00317.27
8.0.210.0040.00417.21
8.0.200.0060.00017.41
8.0.190.0040.00417.27
8.0.180.0000.00717.18
8.0.170.0000.00817.34
8.0.160.0080.00017.27
8.0.150.0060.00317.24
8.0.140.0080.00017.13
8.0.130.0000.00613.64
8.0.120.0040.00417.27
8.0.110.0040.00417.20
8.0.100.0020.00517.32
8.0.90.0040.00417.21
8.0.80.0100.00717.27
8.0.70.0000.00717.18
8.0.60.0000.00717.08
8.0.50.0000.00817.34
8.0.30.0060.01417.35
8.0.20.0160.00417.40
8.0.10.0070.00017.11
8.0.00.0070.01117.01
7.4.330.0000.00515.23
7.4.320.0030.00316.75
7.4.300.0000.00616.68
7.4.290.0040.00416.76
7.4.280.0030.00316.77
7.4.270.0030.00516.79
7.4.260.0040.00416.75
7.4.250.0000.00916.80
7.4.240.0020.00516.79
7.4.230.0000.00716.85
7.4.220.0090.01516.83
7.4.210.0100.00916.84
7.4.200.0040.00416.79
7.4.190.0040.00416.75
7.4.160.0000.01816.91
7.4.150.0100.01017.40
7.4.140.0050.01217.86
7.4.130.0090.00916.95
7.4.120.0080.00916.75
7.4.110.0060.01216.80
7.4.100.0080.00916.82
7.4.90.0040.01316.83
7.4.80.0090.00919.39
7.4.70.0100.00716.76
7.4.60.0090.00616.82
7.4.50.0030.00316.57
7.4.40.0040.01122.77
7.4.30.0090.00916.57
7.4.00.0090.00615.43
7.3.330.0020.00213.46
7.3.320.0000.00513.33
7.3.310.0000.00816.75
7.3.300.0040.00416.51
7.3.290.0110.00716.62
7.3.280.0060.01116.64
7.3.270.0110.00717.40
7.3.260.0040.01316.85
7.3.250.0050.01216.57
7.3.240.0060.01016.67
7.3.230.0110.00616.57
7.3.210.0110.01216.87
7.3.200.0110.01119.39
7.3.190.0160.00716.78
7.3.180.0100.00716.65
7.3.170.0060.00916.64
7.3.160.0120.00316.85
7.3.120.0060.00915.23
7.3.10.0070.00916.90
7.3.00.0080.01016.96
7.2.330.0070.01316.98
7.2.320.0070.01516.86
7.2.310.0040.01416.88
7.2.300.0080.00816.96
7.2.290.0060.01216.84
7.2.130.0080.00716.91
7.2.120.0080.01116.90
7.2.110.0100.00616.97
7.2.100.0080.01016.97
7.2.90.0060.01017.15
7.2.80.0090.00716.96
7.2.70.0070.01116.92
7.2.60.0080.01016.93
7.2.50.0080.00717.17
7.2.40.0030.01217.04
7.2.30.0080.00917.06
7.2.20.0100.00817.09
7.2.10.0060.00816.96
7.2.00.0070.00817.93
7.1.250.0100.01015.85
7.1.200.0080.00315.88
7.1.100.0100.00318.03
7.1.70.0060.00916.96
7.1.60.0070.01819.82
7.1.50.0090.01617.43
7.1.00.0000.08022.53
7.0.200.0030.00616.60
7.0.140.0030.07322.21
7.0.60.0100.07019.94
7.0.50.0100.06317.95
7.0.40.0100.08020.07
7.0.30.0300.05020.03
7.0.20.0330.07720.05
7.0.10.0000.04720.18
7.0.00.0070.09320.05
5.6.280.0030.07021.14
5.6.210.0030.04020.47
5.6.200.0100.07718.22
5.6.190.0100.03720.45
5.6.180.0200.07320.40
5.6.170.0200.04720.38
5.6.160.0030.08720.50
5.6.150.0100.07718.11
5.6.140.0070.04018.17
5.6.130.0070.04018.23
5.6.120.0100.04320.99
5.6.110.0100.03720.93
5.6.100.0100.08320.99
5.6.90.0100.07720.92
5.6.80.0130.07320.37
5.5.350.4230.02720.44
5.5.340.0100.07717.89
5.5.330.0030.08320.21
5.5.320.0200.04020.17
5.5.310.0430.06720.20
5.5.300.0000.04017.97
5.5.290.0200.03018.02
5.5.280.0200.06720.65
5.5.270.0000.04320.67
5.5.260.0170.07020.76
5.5.250.0030.05320.65
5.5.240.0230.05020.07
5.4.450.0470.03319.48
5.4.440.0430.03319.23
5.4.430.0430.07019.40
5.4.420.0600.05719.10
5.4.410.0330.04319.28
5.4.400.0530.04319.08
5.4.390.0530.05319.23
5.4.380.0500.06318.80
5.4.370.0530.06319.13
5.4.360.0600.06018.81
5.4.350.0400.04319.24
5.4.340.0470.06319.07
5.4.320.0570.07019.11
5.4.310.0530.05319.08
5.4.300.0500.07319.12
5.4.290.0530.06019.07
5.4.280.0430.03719.07
5.4.270.0570.05718.91
5.4.260.0470.06319.20
5.4.250.0400.04019.10
5.4.240.0370.03719.20
5.4.230.0400.03319.22
5.4.220.0400.04719.11
5.4.210.0430.07019.11
5.4.200.0500.04719.12
5.4.190.0430.06718.91
5.4.180.0430.05318.79
5.4.170.0400.03719.10
5.4.160.0370.05019.18
5.4.150.0430.03718.89
5.4.140.0470.06016.23
5.4.130.0330.04716.42
5.4.120.0370.03316.53
5.4.110.0530.05316.41
5.4.100.0470.06716.41
5.4.90.0400.04716.21
5.4.80.0470.06016.20
5.4.70.0330.06016.05
5.4.60.0400.05016.36
5.4.50.0330.04016.47
5.4.40.0370.03716.27
5.4.30.0370.04316.36
5.4.20.0430.05716.36
5.4.10.0330.04016.41
5.4.00.0270.03715.68
5.3.290.0370.07014.62
5.3.280.0270.04714.45
5.3.270.0400.03714.54
5.3.260.0470.06714.55
5.3.250.0530.05314.57
5.3.240.0370.04714.55
5.3.230.0600.03314.44
5.3.220.0470.04714.40
5.3.210.0570.05014.55
5.3.200.0470.06714.42
5.3.190.0530.06014.54
5.3.180.0500.05714.42
5.3.170.0470.04314.41
5.3.160.0430.06714.42
5.3.150.0470.07014.50
5.3.140.0500.05314.50
5.3.130.0300.05014.41
5.3.120.0400.04014.42
5.3.110.0430.04014.59
5.3.100.0470.05713.89
5.3.90.0470.02713.97
5.3.80.0470.02713.89
5.3.70.0370.03713.93
5.3.60.0370.06313.79
5.3.50.0370.03013.82
5.3.40.0300.03713.91
5.3.30.0300.04013.71
5.3.20.0370.03713.70
5.3.10.0400.03713.45
5.3.00.0430.03013.51
5.2.170.0300.05312.31
5.2.160.0330.05012.31
5.2.150.0330.05712.31
5.2.140.0270.03312.31
5.2.130.0330.03712.31
5.2.120.0270.02712.31
5.2.110.0400.04712.31
5.2.100.0300.06012.31
5.2.90.0300.03312.31
5.2.80.0370.05012.31
5.2.70.0270.05712.31
5.2.60.0200.03712.31
5.2.50.0370.04712.31
5.2.40.0370.02012.31
5.2.30.0330.04312.31
5.2.20.0300.03012.31
5.2.10.0270.05312.31
5.2.00.0330.04312.31
5.1.60.0300.04312.31
5.1.50.0370.04312.31
5.1.40.0330.02012.31
5.1.30.0400.03712.31
5.1.20.0300.04012.31
5.1.10.0370.04712.31
5.1.00.0330.04312.31
5.0.50.0170.02712.31
5.0.40.0030.0278.49
5.0.30.0070.0378.31
5.0.20.0070.0238.18
5.0.10.0000.0308.14
5.0.00.0070.0408.35
4.4.90.0000.0236.84
4.4.80.0000.0276.84
4.4.70.0000.0236.84
4.4.60.0000.0236.84
4.4.50.0070.0206.84
4.4.40.0070.0306.84
4.4.30.0000.0236.84
4.4.20.0030.0206.84
4.4.10.0000.0236.84
4.4.00.0030.0406.84
4.3.110.0000.0236.84
4.3.100.0000.0236.84
4.3.90.0070.0176.83
4.3.80.0000.0406.76
4.3.70.0000.0306.64
4.3.60.0000.0236.58
4.3.50.0030.0206.51
4.3.40.0030.0336.47
4.3.30.0000.0276.47
4.3.20.0000.0306.47
4.3.10.0100.02012.49
4.3.00.0100.02312.49

preferences:
57.63 ms | 401 KiB | 5 Q