3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mb_ord($string) { if (extension_loaded('mbstring') === true) { mb_language('Neutral'); mb_internal_encoding('UTF-8'); mb_detect_order(array('UTF-8', 'ISO-8859-15', 'ISO-8859-1', 'ASCII')); $result = unpack('N', mb_convert_encoding($string, 'UCS-4BE', 'UTF-8')); if (is_array($result) === true) { return $result[1]; } } return ord($string); } $text = '‖‖‖‖‖‖‖‖‖‖'; $text = preg_split('//u', $text, -1, PREG_SPLIT_NO_EMPTY); for ($idx = 0; $idx < count($text); $idx++) { echo $text[$idx] . ' ' . mb_ord($text[$idx]) . PHP_EOL; }

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.00718.31
8.3.50.0130.00518.37
8.3.40.0090.00918.68
8.3.30.0100.00318.77
8.3.20.0040.00418.44
8.3.10.0050.00318.60
8.3.00.0050.00319.13
8.2.180.0120.00316.38
8.2.170.0070.00722.96
8.2.160.0070.00722.25
8.2.150.0050.00224.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00321.05
8.2.110.0040.00420.43
8.2.100.0070.00717.59
8.2.90.0000.00817.75
8.2.80.0040.00417.97
8.2.70.0030.00617.25
8.2.60.0040.00417.92
8.2.50.0090.00018.07
8.2.40.0040.00419.22
8.2.30.0030.00617.57
8.2.20.0030.00717.35
8.2.10.0000.00717.41
8.2.00.0040.00417.61
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00317.23
8.1.230.0090.00317.77
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00917.10
8.1.190.0030.00617.10
8.1.180.0040.00418.10
8.1.170.0040.00418.81
8.1.160.0000.00718.94
8.1.150.0040.00418.39
8.1.140.0040.00417.26
8.1.130.0040.00419.07
8.1.120.0000.00717.38
8.1.110.0080.00017.22
8.1.100.0000.00817.34
8.1.90.0040.00417.41
8.1.80.0040.00417.19
8.1.70.0040.00417.28
8.1.60.0040.00417.42
8.1.50.0000.00717.31
8.1.40.0040.00417.36
8.1.30.0000.00817.43
8.1.20.0000.01117.48
8.1.10.0040.00417.39
8.1.00.0040.00417.30
8.0.300.0040.00418.77
8.0.290.0070.00316.75
8.0.280.0000.00618.48
8.0.270.0030.00317.17
8.0.260.0000.00816.80
8.0.250.0080.00016.82
8.0.240.0030.00516.80
8.0.230.0060.00316.86
8.0.220.0030.00316.88
8.0.210.0000.00716.70
8.0.200.0060.00016.84
8.0.190.0020.00516.87
8.0.180.0030.00516.83
8.0.170.0000.00816.82
8.0.160.0000.00716.73
8.0.150.0000.00716.73
8.0.140.0080.00316.74
8.0.130.0050.00013.14
8.0.120.0000.00916.89
8.0.110.0040.00416.86
8.0.100.0020.00516.84
8.0.90.0040.00416.85
8.0.80.0080.00816.84
8.0.70.0050.00316.82
8.0.60.0050.00416.80
8.0.50.0000.00816.69
8.0.30.0100.00516.89
8.0.20.0110.00916.93
8.0.10.0050.00316.98
8.0.00.0130.00816.62
7.4.330.0050.00012.79
7.4.320.0030.00316.38
7.4.300.0060.00016.47
7.4.290.0000.00816.47
7.4.280.0040.00416.34
7.4.270.0090.00016.49
7.4.260.0070.00013.26
7.4.250.0000.00816.35
7.4.240.0000.00616.42
7.4.230.0030.00316.44
7.4.220.0070.01016.52
7.4.210.0070.00716.36
7.4.200.0060.00016.46
7.4.190.0020.00516.51
7.4.160.0100.00716.25
7.4.150.0100.00616.30
7.4.140.0120.01217.86
7.4.130.0130.01016.44
7.4.120.0100.01016.31
7.4.110.0090.01116.49
7.4.100.0030.01316.57
7.4.90.0140.00316.26
7.4.80.0030.01319.39
7.4.70.0070.01016.36
7.4.60.0190.00316.38
7.4.50.0040.00416.39
7.4.40.0070.00716.46
7.4.30.0100.00716.34
7.4.00.0100.00314.57
7.3.330.0030.00313.05
7.3.320.0050.00013.09
7.3.310.0080.00016.30
7.3.300.0060.00016.29
7.3.290.0080.00816.25
7.3.280.0060.00916.24
7.3.270.0090.01016.36
7.3.260.0090.00916.24
7.3.240.0090.00916.31
7.3.230.0030.01316.30
7.3.210.0040.01416.33
7.3.200.0110.00716.32
7.3.190.0060.01216.46
7.3.180.0060.01016.33
7.3.170.0160.00316.23
7.3.160.0100.00616.48
7.3.120.0100.00714.86
7.2.330.0110.01116.42
7.2.320.0090.00916.54
7.2.310.0140.00316.50
7.2.300.0100.00716.43
7.2.290.0110.00716.44
7.2.60.0030.01016.54
7.1.200.0040.00815.91
7.1.70.0070.00317.55
7.1.60.0140.01119.25
7.1.50.0030.02017.32
7.1.00.0030.03322.32
7.0.200.0030.00717.05
7.0.140.0030.07321.93
7.0.120.0030.06722.08
7.0.60.0000.08020.06
7.0.50.0070.08017.93
7.0.40.0130.04017.73
7.0.30.0170.06717.73
7.0.20.0070.08317.74
7.0.10.0070.05717.85
7.0.00.0100.04017.82
5.6.280.0000.07321.03
5.6.210.0070.05320.77
5.6.200.0070.08018.19
5.6.190.0100.05318.14
5.6.180.0030.07018.14
5.6.170.0070.08318.15
5.6.160.0030.08318.29
5.6.150.0100.07718.15
5.6.140.0070.06318.18
5.6.130.0100.06018.15
5.6.120.0070.07018.18
5.6.110.0100.06018.28
5.6.100.0100.07018.28
5.6.90.0030.04318.10
5.6.80.0130.06717.58
5.6.70.0130.07717.57
5.6.60.0070.07317.60
5.6.50.0070.06717.58
5.6.40.0070.06317.58
5.6.30.0070.07017.54
5.6.20.0070.07017.63
5.6.10.0030.06017.59
5.6.00.0130.06717.49
5.5.350.0170.07720.45
5.5.340.0100.07717.96
5.5.330.0030.04317.94
5.5.320.0000.08718.09
5.5.310.0070.05318.00
5.5.300.0130.08017.97
5.5.290.0030.04718.07
5.5.280.0030.06017.98
5.5.270.0100.04017.98
5.5.260.0100.05318.03
5.5.250.0100.03717.77
5.5.240.0030.08317.41
5.5.230.0130.07017.37
5.5.220.0030.08317.46
5.5.210.0130.07317.43
5.5.200.0100.03317.28
5.5.190.0070.07317.34
5.5.180.0170.06717.29
5.5.160.0170.07317.31
5.5.150.0100.03717.36
5.5.140.0000.04317.29
5.5.130.0070.07717.27
5.5.120.0130.07017.30
5.5.110.0070.06317.42
5.5.100.0000.05317.21
5.5.90.0130.04017.23
5.5.80.0030.07017.22
5.5.70.0030.05017.32
5.5.60.0170.06317.31
5.5.50.0070.07717.32
5.5.40.0130.07017.32
5.5.30.0100.06017.27
5.5.20.0070.03717.22
5.5.10.0070.04717.18
5.5.00.0100.05017.30
5.4.450.0030.04319.22
5.4.440.0030.04019.46
5.4.430.0070.04319.39
5.4.420.0100.05719.21
5.4.410.0100.04719.33
5.4.400.0130.07319.05
5.4.390.0030.05318.89
5.4.380.0070.07018.99
5.4.370.0030.06019.03
5.4.360.0030.04319.04
5.4.350.0070.04018.98
5.4.340.0070.05719.02
5.4.320.0130.07019.12
5.4.310.0070.04719.05
5.4.300.0070.06719.14
5.4.290.0030.07718.97
5.4.280.0030.08019.26
5.4.270.0100.07019.09
5.4.260.0100.06318.98
5.4.250.0030.05719.13
5.4.240.0030.04018.87
5.4.230.0100.07718.98
5.4.220.0030.04019.04
5.4.210.0070.03719.26
5.4.200.0000.06719.27
5.4.190.0070.06018.96
5.4.180.0130.06719.04
5.4.170.0070.07319.12
5.4.160.0000.05319.01
5.4.150.0130.07719.04
5.4.140.0030.07016.57
5.4.130.0100.05316.43
5.4.120.0100.06016.29
5.4.110.0030.08016.47
5.4.100.0100.06716.68
5.4.90.0100.04316.23
5.4.80.0030.03716.44
5.4.70.0070.03316.29
5.4.60.0030.06316.41
5.4.50.0100.06716.41
5.4.40.0130.06716.58
5.4.30.0070.07716.26
5.4.20.0100.03316.45
5.4.10.0070.03316.22
5.4.00.0100.03015.74
5.3.290.0070.06314.74
5.3.280.0070.05314.70
5.3.270.0100.03314.68
5.3.260.0070.06314.62
5.3.250.0100.03714.64
5.3.240.0030.07314.60
5.3.230.0030.05314.64
5.3.220.0030.07014.78
5.3.210.0000.07014.67
5.3.200.0200.06714.61
5.3.190.0030.08014.53
5.3.180.0030.04014.59
5.3.170.0000.07714.61
5.3.160.0030.07314.61
5.3.150.0030.06014.41
5.3.140.0030.06014.77
5.3.130.0100.06014.55
5.3.120.0000.06014.62
5.3.110.0100.04314.55
5.3.100.0070.07014.03
5.3.90.0070.03314.12
5.3.80.0070.03314.05
5.3.70.0000.04014.08
5.3.60.0030.03713.99
5.3.50.0030.03313.84
5.3.40.0000.03714.00
5.3.30.0000.03713.96
5.3.20.0000.03713.59
5.3.10.0070.03013.68
5.3.00.0000.03713.73
5.2.170.0000.03011.14
5.2.160.0070.02311.11
5.2.150.0030.02711.19
5.2.140.0000.03011.19
5.2.130.0000.03010.95
5.2.120.0000.03011.32
5.2.110.0030.03311.15
5.2.100.0070.02311.09
5.2.90.0000.03011.14
5.2.80.0000.03011.19
5.2.70.0000.03010.94
5.2.60.0030.02711.02
5.2.50.0100.02010.92
5.2.40.0030.02711.00
5.2.30.0030.02711.07
5.2.20.0070.03011.07
5.2.10.0030.02710.87
5.2.00.0000.03010.75
5.1.60.0000.03310.04
5.1.50.0000.03710.07
5.1.40.0030.0209.81
5.1.30.0000.03310.29
5.1.20.0030.02310.39
5.1.10.0030.02310.13
5.1.00.0030.02310.10
5.0.50.0000.0208.78
5.0.40.0000.0208.45
5.0.30.0000.0308.43
5.0.20.0000.0208.13
5.0.10.0000.0208.18
5.0.00.0070.0238.22
4.4.90.0000.0137.99
4.4.80.0030.0137.99
4.4.70.0000.0177.99
4.4.60.0000.0177.99
4.4.50.0000.0177.99
4.4.40.0000.0237.99
4.4.30.0070.0107.99
4.4.20.0030.0137.99
4.4.10.0000.0177.99
4.4.00.0000.0237.99
4.3.110.0030.0137.99
4.3.100.0000.0137.99
4.3.90.0000.0137.99
4.3.80.0000.0237.99
4.3.70.0000.0137.99
4.3.60.0000.0137.99
4.3.50.0000.0207.99
4.3.40.0000.0237.99
4.3.30.0000.0137.99
4.3.20.0000.0277.99
4.3.10.0030.0137.99
4.3.00.0000.0137.99

preferences:
39.43 ms | 401 KiB | 5 Q