3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hex_dump($data, $newline="\n") { static $from = ''; static $to = ''; static $width = 16; # number of bytes per line static $pad = '.'; # padding for non-visible characters if ($from==='') { for ($i=0; $i<=0xFF; $i++) { $from .= chr($i); $to .= ($i >= 0x20 && $i <= 0x7E) ? chr($i) : $pad; } } $hex = str_split(bin2hex($data), $width*2); $chars = str_split(strtr($data, $from, $to), $width); $offset = 0; foreach ($hex as $i => $line) { echo sprintf('%6X',$offset).' : '.implode(' ', str_split($line,2)) . ' [' . $chars[$i] . ']' . $newline; $offset += $width; } } $str = "\xC2\xA1Hola!"; // 7 bytes (6 characters in UTF-8) echo $str."\n"; hex_dump($str); echo"\n"; hex_dump(mb_convert_encoding($str, 'UTF-32', 'UTF-8')); echo"\n"; hex_dump(iconv('UTF-8', 'UTF-32', $str)); echo"\n"; hex_dump(mb_convert_encoding(mb_convert_encoding($str, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32'));

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.01116.88
8.3.50.0090.00822.10
8.3.40.0200.00018.76
8.3.30.0120.00319.23
8.3.20.0080.00020.34
8.3.10.0000.00923.64
8.3.00.0080.00019.02
8.2.180.0110.00418.54
8.2.170.0120.00322.96
8.2.160.0140.00020.34
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0000.00820.87
8.2.110.0000.01022.29
8.2.100.0080.00317.97
8.2.90.0030.00519.35
8.2.80.0050.00317.97
8.2.70.0080.00017.75
8.2.60.0050.00318.05
8.2.50.0120.00018.07
8.2.40.0000.00820.01
8.2.30.0070.00018.23
8.2.20.0040.00417.76
8.2.10.0000.00818.21
8.2.00.0000.00817.95
8.1.280.0090.00625.92
8.1.270.0060.00324.01
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0040.00423.96
8.1.230.0040.00818.99
8.1.220.0050.00317.77
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00818.63
8.1.160.0000.00821.98
8.1.150.0040.00418.79
8.1.140.0040.00417.48
8.1.130.0030.00517.88
8.1.120.0070.00017.48
8.1.110.0030.00717.52
8.1.100.0040.00417.55
8.1.90.0050.00317.62
8.1.80.0030.00517.47
8.1.70.0070.00017.55
8.1.60.0040.00417.74
8.1.50.0050.00317.57
8.1.40.0000.00717.51
8.1.30.0050.00517.76
8.1.20.0040.00417.59
8.1.10.0040.00417.70
8.1.00.0000.00817.66
8.0.300.0050.00518.77
8.0.290.0000.00717.41
8.0.280.0030.00318.61
8.0.270.0040.00417.43
8.0.260.0070.00017.42
8.0.250.0000.00717.02
8.0.240.0030.00317.11
8.0.230.0040.00417.01
8.0.220.0030.00317.13
8.0.210.0040.00417.09
8.0.200.0030.00617.02
8.0.190.0080.00017.11
8.0.180.0000.00817.15
8.0.170.0030.00517.11
8.0.160.0000.00717.02
8.0.150.0080.00017.01
8.0.140.0030.00616.96
8.0.130.0030.00313.48
8.0.120.0030.00617.16
8.0.110.0000.01017.08
8.0.100.0000.01017.03
8.0.90.0000.00917.06
8.0.80.0130.01017.10
8.0.70.0060.00317.04
8.0.60.0000.00917.22
8.0.50.0000.00917.17
8.0.30.0080.01217.30
8.0.20.0050.01517.40
8.0.10.0090.00017.10
8.0.00.0110.00817.07
7.4.330.0000.00515.06
7.4.320.0030.00316.76
7.4.300.0060.00016.62
7.4.290.0030.00316.60
7.4.280.0060.00316.54
7.4.270.0040.00416.63
7.4.260.0080.00016.52
7.4.250.0000.00916.84
7.4.240.0040.00516.91
7.4.230.0050.00316.93
7.4.220.0120.01516.79
7.4.210.0090.01016.85
7.4.200.0030.00616.62
7.4.190.0030.00616.75
7.4.160.0100.01016.70
7.4.150.0090.01217.40
7.4.140.0150.00917.86
7.4.130.0150.00416.70
7.4.120.0060.01416.86
7.4.110.0090.01216.85
7.4.100.0120.00916.64
7.4.90.0100.01016.80
7.4.80.0060.01219.39
7.4.70.0070.01616.72
7.4.60.0200.00916.63
7.4.50.0020.01516.61
7.4.40.0080.01216.63
7.4.30.0030.03116.36
7.4.20.0120.00916.62
7.4.10.0110.01415.75
7.4.00.0100.01115.71
7.3.330.0050.00013.61
7.3.320.0030.00313.38
7.3.310.0060.00316.46
7.3.300.0030.00516.67
7.3.290.0060.01216.65
7.3.280.0120.00916.63
7.3.270.0100.00917.40
7.3.260.0110.01616.68
7.3.250.0030.01716.72
7.3.240.0030.01716.70
7.3.230.0030.01516.59
7.3.210.0140.00816.95
7.3.200.0050.01316.68
7.3.190.0080.01816.60
7.3.180.0120.01516.84
7.3.170.0120.01016.54
7.3.160.0070.01216.49
7.3.150.0170.00616.60
7.3.140.0150.01216.57
7.3.130.0130.00915.88
7.3.120.0090.01115.55
7.3.110.0090.00915.87
7.3.100.0110.00615.69
7.3.90.0040.01715.68
7.3.80.0050.01415.80
7.3.70.0120.00615.85
7.3.60.0110.00715.98
7.3.50.0030.01515.58
7.3.40.0080.01115.75
7.3.30.0060.01615.75
7.3.20.0070.01616.71
7.3.10.0100.00816.85
7.3.00.0100.00716.76
7.2.330.0140.01416.67
7.2.320.0180.00316.91
7.2.310.0070.01616.83
7.2.300.0100.01316.81
7.2.290.0100.01316.90
7.2.280.0120.01116.91
7.2.270.0080.01516.77
7.2.260.0030.01715.88
7.2.250.0140.00716.11
7.2.240.0110.01016.06
7.2.230.0120.00815.96
7.2.220.0050.01716.07
7.2.210.0060.01216.15
7.2.200.0100.00816.02
7.2.190.0050.01216.12
7.2.180.0100.00916.02
7.2.170.0070.01516.06
7.2.160.0080.01215.98
7.2.150.0080.01217.00
7.2.140.0070.01217.04
7.2.130.0060.01617.08
7.2.120.0130.00917.04
7.2.110.0090.01117.10
7.2.100.0090.01316.88
7.2.90.0110.01116.96
7.2.80.0080.01117.01
7.2.70.0080.01016.95
7.2.60.0070.01217.02
7.2.50.0090.01417.04
7.2.40.0080.01316.91
7.2.30.0070.01516.85
7.2.20.0080.01117.04
7.2.10.0080.01017.02
7.2.00.0130.01317.88
7.1.330.0070.01615.99
7.1.320.0120.00815.92
7.1.310.0080.00815.92
7.1.300.0110.00515.93
7.1.290.0510.00815.86
7.1.280.0040.01015.96
7.1.270.0050.01215.97
7.1.260.0070.01015.74
7.1.250.0080.01215.88
7.1.240.0070.01215.95
7.1.230.0120.00415.77
7.1.220.0090.01215.90
7.1.210.0160.01015.93
7.1.200.0060.01415.90
7.1.190.0110.01015.80
7.1.180.0050.01615.92
7.1.170.0110.01015.74
7.1.160.0060.00915.90
7.1.150.0110.01415.81
7.1.140.0140.00715.87
7.1.130.0070.01415.99
7.1.120.0180.01316.02
7.1.110.0110.01215.98
7.1.100.0090.01216.70
7.1.90.0080.01216.03
7.1.80.0100.01015.91
7.1.70.0120.01216.39
7.1.60.0050.01617.11
7.1.50.0130.01522.24
7.1.40.0100.01415.90
7.1.30.0080.01716.00
7.1.20.0110.01015.91
7.1.10.0120.01416.01
7.1.00.0130.03018.15
7.0.330.0080.01115.66
7.0.320.0050.01215.54
7.0.310.0130.01115.53
7.0.300.0150.01315.46
7.0.290.0080.01115.70
7.0.280.0080.01015.60
7.0.270.0090.01215.60
7.0.260.0110.01415.58
7.0.250.0100.01015.67
7.0.240.0100.01015.55
7.0.230.0100.01215.57
7.0.220.0100.01015.54
7.0.210.0100.01215.66
7.0.200.0080.00816.10
7.0.190.0100.01015.63
7.0.180.0100.01115.74
7.0.170.0120.01315.68
7.0.160.0090.01315.53
7.0.150.0130.00615.53
7.0.140.0050.03517.76
7.0.130.0060.02015.67
7.0.120.0150.01015.52
7.0.110.0120.01215.54
7.0.100.0130.00915.41
7.0.90.0210.01115.69
7.0.80.0100.01115.58
7.0.70.0080.00815.67
7.0.60.0070.03317.07
7.0.50.0100.03816.46
7.0.40.0140.02316.50
7.0.30.0170.03116.51
7.0.20.0130.03516.46
7.0.10.0070.03316.58
7.0.00.0100.03416.51
5.6.400.0060.01115.51
5.6.390.0120.01215.47
5.6.380.0090.01215.40
5.6.370.0110.00915.43
5.6.360.0050.01415.42
5.6.350.0120.00815.38
5.6.340.0080.01315.46
5.6.330.0180.02415.40
5.6.320.0080.01015.43
5.6.310.0070.01615.48
5.6.300.0090.01215.53
5.6.290.0070.01415.40
5.6.280.0130.03317.31
5.6.270.0090.01415.46
5.6.260.0100.01415.58
5.6.250.0100.01315.37
5.6.240.0090.01415.39
5.6.230.0160.01215.42
5.6.220.0080.01015.47
5.6.210.0070.03617.22
5.6.200.0070.03816.31
5.6.190.0120.03417.18
5.6.180.0190.03017.16
5.6.170.0090.02417.28
5.6.160.0080.02317.20
5.6.150.0070.02316.30
5.6.140.0100.02516.30
5.6.130.0080.03616.46
5.6.120.0060.02217.52
5.6.110.0080.03217.30
5.6.100.0090.03317.38
5.6.90.0140.02917.34
5.6.80.0070.03517.05
5.6.70.0100.00815.39
5.6.60.0070.01515.29
5.6.50.0050.01315.23
5.6.40.0050.01115.43
5.6.30.0060.01415.41
5.6.20.0100.01915.24
5.6.10.0050.01315.27
5.6.00.0060.01515.52
5.5.380.0200.01015.39
5.5.370.0110.01715.31
5.5.360.0030.01915.28
5.5.350.0170.03117.04
5.5.340.0180.03016.25
5.5.330.0170.03017.02
5.5.320.0160.03117.20
5.5.310.0170.03016.86
5.5.300.0120.03716.29
5.5.290.0130.03216.22
5.5.280.0110.03817.28
5.5.270.0100.02517.19
5.5.260.0100.03617.27
5.5.250.0100.03117.10
5.5.240.0090.02317.02
5.5.230.0150.01115.26
5.5.220.0210.01015.28
5.5.210.0120.01315.24
5.5.200.0140.01015.26
5.5.190.0080.01415.19
5.5.180.0160.01115.30
5.5.170.0120.01115.23
5.5.160.0070.01815.40
5.5.150.0110.01315.32
5.5.140.0130.01015.24
5.5.130.0170.00615.38
5.5.120.0090.01415.37
5.5.110.0090.01315.21
5.5.100.0150.00715.36
5.5.90.0090.01115.35
5.5.80.0170.00715.33
5.5.70.0150.00815.26
5.5.60.0100.01215.20
5.5.50.0080.01315.43
5.5.40.0150.00715.35
5.5.30.0090.01615.29
5.5.20.0090.01515.16
5.5.10.0110.01015.34
5.5.00.0180.00915.36
5.4.450.0120.02314.96
5.4.440.0300.02614.99
5.4.430.0440.02214.98
5.4.420.0260.02915.11
5.4.410.0380.03014.97
5.4.400.0370.02814.88
5.4.390.0510.02315.02
5.4.380.0180.01914.77
5.4.370.0100.02714.71
5.4.360.0170.01914.80
5.4.350.0190.01514.70
5.4.340.0140.02514.78
5.4.330.0060.01012.70
5.4.320.0120.01812.67
5.4.310.0070.01912.67
5.4.300.0050.02212.70
5.4.290.0080.01812.68
5.4.280.0110.01612.61
5.4.270.0090.02012.62
5.4.260.0070.02412.66
5.4.250.0110.02112.68
5.4.240.0060.02012.66
5.4.230.0050.02212.66
5.4.220.0060.02012.61
5.4.210.0130.01412.71
5.4.200.0050.02512.70
5.4.190.0090.02112.63
5.4.180.0090.01912.61
5.4.170.0110.01812.65
5.4.160.0100.02412.64
5.4.150.0070.02012.71
5.4.140.0080.01912.54
5.4.130.0080.01812.58
5.4.120.0090.02512.49
5.4.110.0060.02612.57
5.4.100.0110.02012.51
5.4.90.0090.02212.52
5.4.80.0090.02112.53
5.4.70.0140.02212.59
5.4.60.0090.01912.59
5.4.50.0070.02012.61
5.4.40.0090.01912.53
5.4.30.0080.01812.59
5.4.20.0110.01812.53
5.4.10.0090.01912.60
5.4.00.0070.01912.38
5.3.290.0080.02313.00
5.3.280.0070.02012.99
5.3.270.0090.01913.00
5.3.260.0080.02012.98
5.3.250.0100.01812.94
5.3.240.0080.01912.91
5.3.230.0130.01712.96
5.3.220.0100.02312.87
5.3.210.0080.02612.92
5.3.200.0070.02312.91
5.3.190.0080.01912.88
5.3.180.0110.01912.90
5.3.170.0080.02012.90
5.3.160.0090.02112.91
5.3.150.0130.02012.96
5.3.140.0080.01812.90
5.3.130.0080.02612.90
5.3.120.0090.02212.89
5.3.110.0110.02212.92
5.3.100.0090.02312.73
5.3.90.0110.02212.76
5.3.80.0090.01912.67
5.3.70.0090.02012.72
5.3.60.0080.01912.78
5.3.50.0090.01912.66
5.3.40.0080.02012.71
5.3.30.0100.01812.67
5.3.20.0100.01712.57
5.3.10.0080.02112.50
5.3.00.0060.02012.52
5.2.170.0110.01811.01
5.2.160.0090.02110.94
5.2.150.0060.02410.95
5.2.140.0120.01910.90
5.2.130.0110.02210.96
5.2.120.0070.02711.00
5.2.110.0150.02210.95
5.2.100.0090.02810.94
5.2.90.0110.02410.91
5.2.80.0110.02610.92
5.2.70.0180.01810.86
5.2.60.0090.02210.85
5.2.50.0100.02010.89
5.2.40.0100.02110.81
5.2.30.0070.02610.89
5.2.20.0060.02510.75
5.2.10.0090.02010.81
5.2.00.0070.02310.59
5.1.60.0080.02110.10
5.1.50.0090.01910.10
5.1.40.0060.02110.09
5.1.30.0080.02410.26
5.1.20.0090.02210.27
5.1.10.0080.02410.13
5.1.00.0110.01410.13
5.0.50.0060.0159.38
5.0.40.0060.0159.30
5.0.30.0070.0209.21
5.0.20.0080.0129.20
5.0.10.0060.0199.19
5.0.00.0060.0249.18
4.4.90.0050.0118.34
4.4.80.0050.0098.33
4.4.70.0010.0128.33
4.4.60.0060.0108.33
4.4.50.0070.0078.33
4.4.40.0040.0158.31
4.4.30.0020.0128.33
4.4.20.0050.0098.37
4.4.10.0040.0118.38
4.4.00.0040.0158.33
4.3.110.0030.0118.29
4.3.100.0010.0168.29
4.3.90.0070.0098.27
4.3.80.0010.0188.24
4.3.70.0070.0108.27
4.3.60.0030.0148.27
4.3.50.0050.0138.27
4.3.40.0040.0208.22
4.3.30.0020.0137.61
4.3.20.0040.0097.60
4.3.10.0020.0137.58
4.3.00.0040.0139.67

preferences:
43.18 ms | 401 KiB | 5 Q