3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); $tests = array(); $test_string = html_entity_decode('&#x0BA8;', ENT_COMPAT, 'UTF-8'); $tests['string_length'] = (mb_strlen($test_string, 'UTF-8') === 1); $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.0150.00418.93
8.3.50.0120.00622.05
8.3.40.0190.00318.96
8.3.30.0090.00619.13
8.3.20.0040.00420.95
8.3.10.0040.00421.23
8.3.00.0080.00021.86
8.2.180.0110.00716.75
8.2.170.0150.00022.96
8.2.160.0070.00720.53
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0030.00726.16
8.2.120.0060.00321.23
8.2.110.0110.00020.40
8.2.100.0110.00018.16
8.2.90.0000.00819.30
8.2.80.0050.00219.40
8.2.70.0050.00317.88
8.2.60.0040.00417.91
8.2.50.0050.00318.07
8.2.40.0070.00018.28
8.2.30.0040.00419.46
8.2.20.0000.00818.03
8.2.10.0080.00018.04
8.2.00.0040.00418.14
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00322.70
8.1.230.0040.00820.95
8.1.220.0050.00318.77
8.1.210.0040.00418.94
8.1.200.0000.00917.60
8.1.190.0040.00417.63
8.1.180.0080.00018.10
8.1.170.0040.00418.67
8.1.160.0040.00419.03
8.1.150.0000.00718.86
8.1.140.0040.00417.61
8.1.130.0030.00517.90
8.1.120.0040.00417.51
8.1.110.0040.00417.50
8.1.100.0040.00417.55
8.1.90.0000.00717.50
8.1.80.0040.00317.63
8.1.70.0030.00317.41
8.1.60.0060.00317.78
8.1.50.0030.00517.68
8.1.40.0000.00817.73
8.1.30.0040.00417.75
8.1.20.0000.00817.94
8.1.10.0000.00917.78
8.1.00.0040.00417.68
8.0.300.0000.00819.98
8.0.290.0000.00717.18
8.0.280.0030.00318.50
8.0.270.0040.00417.44
8.0.260.0000.00617.12
8.0.250.0030.00517.22
8.0.240.0000.00917.34
8.0.230.0000.00717.24
8.0.220.0000.00717.27
8.0.210.0030.00317.29
8.0.200.0000.00817.21
8.0.190.0030.00317.35
8.0.180.0040.00417.29
8.0.170.0030.00317.29
8.0.160.0080.00017.34
8.0.150.0040.00417.28
8.0.140.0040.00417.24
8.0.130.0000.00513.75
8.0.120.0040.00417.31
8.0.110.0040.00317.14
8.0.100.0040.00417.39
8.0.90.0050.00317.23
8.0.80.0070.01117.23
8.0.70.0050.00217.15
8.0.60.0030.00517.17
8.0.50.0040.00417.38
8.0.30.0120.00717.29
8.0.20.0100.00917.52
8.0.10.0040.00417.13
8.0.00.0120.01317.02
7.4.330.0000.00516.73
7.4.320.0000.00616.86
7.4.300.0070.00016.76
7.4.290.0000.00716.74
7.4.280.0040.00416.72
7.4.270.0030.00316.70
7.4.260.0000.00513.57
7.4.250.0040.00416.71
7.4.240.0030.00316.76
7.4.230.0070.00016.68
7.4.220.0150.00316.71
7.4.210.0110.00416.82
7.4.200.0000.00716.67
7.4.190.0030.00616.66
7.4.160.0160.00016.68
7.4.150.0120.01217.40
7.4.140.0080.01017.86
7.4.130.0120.00916.79
7.4.120.0100.01416.66
7.4.110.0090.00916.73
7.4.100.0160.00716.73
7.4.90.0120.00616.79
7.4.80.0070.01119.39
7.4.70.0100.00716.74
7.4.60.0060.01116.94
7.4.50.0090.00016.94
7.4.40.0040.01122.77
7.4.30.0180.00416.52
7.4.00.0030.01215.33
7.3.330.0020.00213.34
7.3.320.0030.00313.32
7.3.310.0040.00416.70
7.3.300.0050.00216.51
7.3.290.0090.00916.64
7.3.280.0090.00616.59
7.3.270.0120.00617.40
7.3.260.0130.00618.24
7.3.250.0100.01016.55
7.3.240.0070.01016.60
7.3.230.0140.00316.63
7.3.210.0040.01416.88
7.3.200.0120.00319.39
7.3.190.0100.01416.65
7.3.180.0030.01416.77
7.3.170.0080.00716.77
7.3.160.0170.00616.59
7.3.120.0070.00715.29
7.3.00.0160.00016.78
7.2.330.0030.01416.85
7.2.320.0160.00317.03
7.2.310.0090.00916.96
7.2.300.0070.01016.91
7.2.290.0000.01716.87
7.2.130.0100.00716.60
7.2.120.0140.00717.08
7.2.110.0060.01217.20
7.2.100.0160.00316.91
7.2.90.0100.01016.80
7.2.80.0100.01016.82
7.2.70.0130.01016.97
7.2.60.0070.00917.09
7.2.50.0170.00316.84
7.2.40.0090.00917.17
7.2.30.0110.00717.00
7.2.20.0030.01416.78
7.2.10.0070.00816.97
7.2.00.0080.00718.37
7.1.250.0120.00415.66
7.1.240.0130.01015.91
7.1.230.0090.00616.06
7.1.220.0160.00315.55
7.1.210.0200.00015.97
7.1.200.0060.01116.05
7.1.190.0110.00315.95
7.1.180.0170.00015.79
7.1.170.0090.00616.15
7.1.160.0120.00316.03
7.1.150.0140.00015.70
7.1.140.0110.00415.77
7.1.130.0070.01115.63
7.1.120.0080.00415.93
7.1.110.0140.00015.82
7.1.100.0090.00816.83
7.1.90.0080.00515.93
7.1.80.0160.00315.74
7.1.70.0050.00716.69
7.1.60.0080.00516.64
7.1.50.0090.00616.55
7.1.40.0070.01016.39
7.1.30.0070.00716.44
7.1.20.0110.00516.55
7.1.10.0060.00416.41
7.1.00.0060.00616.51
7.0.330.0080.00815.43
7.0.320.0130.00415.22
7.0.310.0090.00615.36
7.0.300.0080.00815.28
7.0.290.0080.00815.02
7.0.280.0080.00815.18
7.0.270.0160.00015.43
7.0.260.0080.00815.43
7.0.250.0130.00315.33
7.0.240.0130.00315.50
7.0.230.0070.00715.64
7.0.220.0070.01015.63
7.0.210.0080.00815.63
7.0.200.0040.00916.19
7.0.190.0090.00316.22
7.0.180.0050.00616.11
7.0.170.0090.00616.24
7.0.160.0040.00816.19
7.0.150.0070.00316.05
7.0.140.0070.00816.20
7.0.130.0040.00816.29
7.0.120.0070.00916.18
7.0.110.0090.00716.29
7.0.100.0070.00616.13
7.0.90.0130.00316.33
7.0.80.0050.00716.26
7.0.70.0090.00616.26
7.0.60.0090.00916.12
7.0.50.0030.00916.28
7.0.40.0030.00615.09
7.0.30.0070.00515.22
7.0.20.0050.00815.16
7.0.10.0060.00815.28
7.0.00.0050.00415.38
5.6.380.0000.01114.37
5.6.370.0120.00614.32
5.6.360.0040.00814.60
5.6.350.0110.00214.00
5.6.340.0070.01014.41
5.6.330.0080.00314.75
5.6.320.0060.00614.57
5.6.310.0060.00314.36
5.6.300.0050.04617.64
5.6.290.0030.02817.58
5.6.280.0100.02217.68
5.6.270.0070.03217.60
5.6.260.0060.04317.57
5.6.250.0070.04417.63
5.6.240.0070.04417.43
5.6.230.0100.02117.58
5.6.220.0090.03717.56
5.6.210.0050.03917.63
5.6.200.0090.03017.59
5.6.190.0070.04117.53
5.6.180.0030.02917.69
5.6.170.0050.03917.57
5.6.160.0080.02017.66
5.6.150.0030.02517.62
5.6.140.0060.02317.61
5.6.130.0040.03317.80
5.6.120.0080.03817.69
5.6.110.0030.02717.61
5.6.100.0070.04517.57
5.6.90.0050.03917.40
5.6.80.0020.02617.35
5.6.70.0070.02917.30
5.6.60.0100.03017.26
5.6.50.0080.02117.31
5.6.40.0000.02917.16
5.6.30.0060.02417.27
5.6.20.0070.02417.27
5.6.10.0040.02517.33
5.6.00.0070.02317.23
5.5.380.0020.03014.28
5.5.370.0030.03314.40
5.5.360.0060.03614.30
5.5.350.0050.02714.30
5.5.340.0040.02314.46
5.5.330.0050.02414.34
5.5.320.0030.02314.49
5.5.310.0030.02514.61
5.5.300.0050.02214.54
5.5.290.0070.03214.61
5.5.280.0030.02414.68
5.5.270.0100.01914.23
5.5.260.0020.02814.47
5.5.250.0020.04314.33
5.5.240.0000.02714.26
5.5.230.0020.02714.21
5.5.220.0050.02914.14
5.5.210.0070.02514.09
5.5.200.0050.01914.25
5.5.190.0080.02314.13
5.5.180.0010.03114.13
5.5.170.0050.00911.08
5.5.160.0060.02414.25
5.5.150.0020.02714.31
5.5.140.0040.02414.27
5.5.130.0050.02814.23
5.5.120.0150.02314.08
5.5.110.0030.02114.16
5.5.100.0090.02014.08
5.5.90.0050.02314.28
5.5.80.0070.02414.25
5.5.70.0020.02314.04
5.5.60.0050.02214.18
5.5.50.0040.02914.25
5.5.40.0080.03014.20
5.5.30.0040.02414.16
5.5.20.0060.02014.21
5.5.10.0000.02614.23
5.5.00.0050.02514.09
5.4.450.0050.02515.23
5.4.440.0050.04315.29
5.4.430.0030.03615.28
5.4.420.0040.02215.20
5.4.410.0030.02515.15
5.4.400.0030.02214.98
5.4.390.0050.02215.04
5.4.380.0040.02314.96
5.4.370.0030.02215.07
5.4.360.0100.01714.81
5.4.350.0020.04115.07
5.4.340.0040.02314.88
5.4.330.0040.00411.09
5.4.320.0030.02315.02
5.4.310.0070.02214.91
5.4.300.0030.02915.02
5.4.290.0020.02115.10
5.4.280.0050.02414.88
5.4.270.0090.01715.10
5.4.260.0060.01915.11
5.4.250.0070.02215.13
5.4.240.0020.02214.92
5.4.230.0030.02715.00
5.4.220.0060.02014.90
5.4.210.0020.02415.14
5.4.200.0080.02015.01
5.4.190.0020.02614.95
5.4.180.0070.02114.99
5.4.170.0010.02415.09
5.4.160.0040.02214.81
5.4.150.0020.02314.99
5.4.140.0090.02613.96
5.4.130.0050.02514.01
5.4.120.0020.02314.07
5.4.110.0030.03314.05
5.4.100.0030.02114.03
5.4.90.0070.01913.87
5.4.80.0020.02214.17
5.4.70.0000.04414.02
5.4.60.0020.02413.98
5.4.50.0050.02013.94
5.4.40.0020.02813.97
5.4.30.0050.03614.00
5.4.20.0050.01913.86
5.4.10.0020.02213.93
5.4.00.0120.03013.98
5.3.290.0100.01713.77
5.3.280.0010.02413.77
5.3.270.0060.01913.82
5.3.260.0060.01713.77
5.3.250.0070.01813.85
5.3.240.0020.02313.81
5.3.230.0050.02113.79
5.3.220.0050.01913.77
5.3.210.0050.02513.79
5.3.200.0050.01913.79
5.3.190.0020.02413.77
5.3.180.0030.02013.79
5.3.170.0030.04113.78
5.3.160.0080.03013.82
5.3.150.0020.02313.87
5.3.140.0020.03913.85
5.3.130.0030.02213.79
5.3.120.0020.02413.80
5.3.110.0060.02013.84
5.3.100.0070.03613.78
5.3.90.0030.02313.79
5.3.80.0020.02513.78
5.3.70.0080.01613.77
5.3.60.0040.01913.82
5.3.50.0050.02013.77
5.3.40.0040.02213.77
5.3.30.0000.02613.79
5.3.20.0050.01713.77
5.3.10.0050.02013.77
5.3.00.0080.01813.77
5.2.170.0030.03013.77
5.2.160.0040.01713.77
5.2.150.0030.01813.77
5.2.140.0030.01813.77
5.2.130.0050.01713.77
5.2.120.0020.02413.77
5.2.110.0040.01513.77
5.2.100.0020.01713.77
5.2.90.0020.01813.77
5.2.80.0040.01813.77
5.2.70.0070.01613.77
5.2.60.0070.02013.77
5.2.50.0030.01513.77
5.2.40.0070.02613.77
5.2.30.0060.02313.77
5.2.20.0080.03013.77
5.2.10.0030.01713.77
5.2.00.0030.02113.77
5.1.60.0030.01813.77
5.1.50.0030.01613.77
5.1.40.0050.02313.77
5.1.30.0030.01813.77
5.1.20.0040.01613.77
5.1.10.0020.01713.77
5.1.00.0070.01113.77
5.0.50.0040.01213.77
5.0.40.0010.01313.77
5.0.30.0020.03213.77
5.0.20.0020.01313.77
5.0.10.0010.01313.77
5.0.00.0030.01613.77
4.4.90.0050.00713.77
4.4.80.0020.01113.77
4.4.70.0020.01213.77
4.4.60.0040.00913.77
4.4.50.0000.01113.77
4.4.40.0020.02013.77
4.4.30.0020.01113.77
4.4.20.0020.01413.77
4.4.10.0020.01113.77
4.4.00.0050.01313.77
4.3.110.0010.01013.77
4.3.100.0050.00713.77
4.3.90.0000.01313.77
4.3.80.0020.02413.77
4.3.70.0000.01213.77
4.3.60.0070.01013.77
4.3.50.0030.00713.77
4.3.40.0030.01413.77
4.3.30.0010.01213.77
4.3.20.0030.01313.77
4.3.10.0040.00713.77
4.3.00.0020.00913.77

preferences:
47.29 ms | 401 KiB | 5 Q