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'));

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.0130.01016.50
8.3.50.0110.00922.04
8.3.40.0120.00318.52
8.3.30.0110.00419.01
8.3.20.0040.00420.30
8.3.10.0080.00023.66
8.3.00.0080.00019.23
8.2.180.0070.00718.16
8.2.170.0070.00722.96
8.2.160.0030.01020.47
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0040.00420.89
8.2.110.0000.00822.11
8.2.100.0080.00417.84
8.2.90.0040.00419.39
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0080.00018.13
8.2.50.0040.00718.07
8.2.40.0040.00419.96
8.2.30.0000.00718.41
8.2.20.0030.00517.89
8.2.10.0000.00818.22
8.2.00.0000.00817.89
8.1.280.0070.00725.92
8.1.270.0090.00023.79
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0040.00421.92
8.1.230.0040.00719.08
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0030.00617.35
8.1.190.0030.00617.35
8.1.180.0080.00018.10
8.1.170.0030.00718.67
8.1.160.0040.00422.18
8.1.150.0000.00818.64
8.1.140.0040.00417.51
8.1.130.0000.00817.92
8.1.120.0000.00817.45
8.1.110.0070.00417.61
8.1.100.0000.00717.55
8.1.90.0000.00817.46
8.1.80.0020.00517.43
8.1.70.0070.00017.46
8.1.60.0040.00417.66
8.1.50.0040.00417.59
8.1.40.0000.00817.63
8.1.30.0030.00617.68
8.1.20.0080.00017.77
8.1.10.0050.00217.66
8.1.00.0000.00817.52
8.0.300.0040.00418.77
8.0.290.0000.00817.15
8.0.280.0030.00518.45
8.0.270.0030.00317.41
8.0.260.0070.00017.31
8.0.250.0040.00416.96
8.0.240.0030.00316.95
8.0.230.0030.00316.90
8.0.220.0060.00316.91
8.0.210.0000.00817.00
8.0.200.0000.00616.94
8.0.190.0000.00717.08
8.0.180.0040.00417.09
8.0.170.0000.00817.06
8.0.160.0000.00816.95
8.0.150.0070.00016.95
8.0.140.0060.00316.87
8.0.130.0060.00013.47
8.0.120.0060.00316.98
8.0.110.0050.00216.86
8.0.100.0040.00417.05
8.0.90.0030.00617.02
8.0.80.0030.01316.98
8.0.70.0000.00817.00
8.0.60.0040.00416.82
8.0.50.0040.00416.92
8.0.30.0130.00617.11
8.0.20.0160.00417.40
8.0.10.0040.00417.00
8.0.00.0110.00816.89
7.4.330.0030.00315.03
7.4.320.0000.00616.60
7.4.300.0030.00316.59
7.4.290.0000.00716.53
7.4.280.0050.00316.59
7.4.270.0000.00716.59
7.4.260.0080.00016.66
7.4.250.0030.00516.58
7.4.240.0010.00616.64
7.4.230.0030.00316.59
7.4.220.0170.00316.79
7.4.210.0020.01216.61
7.4.200.0040.00416.73
7.4.190.0040.00416.88
7.4.160.0060.01016.61
7.4.150.0090.00917.40
7.4.140.0080.01317.86
7.4.130.0080.01116.52
7.4.120.0100.00716.54
7.4.110.0130.01016.53
7.4.100.0090.01216.52
7.4.90.0030.01516.51
7.4.80.0030.01419.39
7.4.70.0110.01116.58
7.4.60.0180.00616.48
7.4.50.0000.00416.53
7.4.40.0060.01116.52
7.4.30.0070.01016.49
7.4.00.0000.00715.01
7.3.330.0050.00013.48
7.3.320.0060.00013.22
7.3.310.0040.00416.44
7.3.300.0000.00716.46
7.3.290.0070.00716.42
7.3.280.0090.00916.47
7.3.270.0120.00617.40
7.3.260.0130.01016.62
7.3.250.0090.01016.55
7.3.240.0140.00316.32
7.3.230.0060.01116.39
7.3.210.0180.00616.55
7.3.200.0110.00719.39
7.3.190.0070.01116.63
7.3.180.0030.01316.57
7.3.170.0180.00416.43
7.3.160.0090.00616.66
7.3.120.0060.00915.14
7.2.330.0140.00516.86
7.2.320.0030.01616.55
7.2.310.0120.00616.80
7.2.300.0120.00316.80
7.2.290.0130.00416.63
7.2.00.0060.00619.61
7.1.200.0070.00715.84
7.1.100.0250.00717.50
7.1.70.0000.01017.13
7.1.60.0070.01719.46
7.1.50.0240.01434.90
7.1.00.0030.07722.44
7.0.200.0040.00416.81
7.0.140.0070.07022.07
7.0.60.0200.06319.92
7.0.50.0100.03317.90
7.0.40.0070.06720.24
7.0.30.0500.07020.12
7.0.20.0230.06320.23
7.0.10.0030.05320.26
7.0.00.0130.08020.25
5.6.280.0000.07320.88
5.6.210.0070.04720.76
5.6.200.0070.08718.14
5.6.190.0170.07720.36
5.6.180.0570.04720.49
5.6.170.0200.04320.55
5.6.160.0070.04020.44
5.6.150.0030.08318.19
5.6.140.0100.08318.16
5.6.130.0030.08318.14
5.6.120.0170.07320.98
5.6.110.0070.08720.98
5.6.100.0100.08020.98
5.6.90.0100.06320.99
5.6.80.0030.07020.30
5.5.350.0030.08720.45
5.5.340.0070.04717.99
5.5.330.0130.07020.36
5.5.320.0000.04020.34
5.5.310.0270.05320.41
5.5.300.0230.07017.98
5.5.290.0100.08318.04
5.5.280.0200.07320.69
5.5.270.0000.05020.97
5.5.260.0030.06020.90
5.5.250.0200.07020.55
5.5.240.0270.06320.16
5.4.450.0370.05319.38
5.4.440.0730.05019.20
5.4.430.0930.07719.44
5.4.420.1130.05719.45
5.4.410.1100.06319.25
5.4.400.0930.08719.04
5.4.390.1070.06319.18
5.4.380.0100.06318.75
5.4.370.0200.07318.78
5.4.360.0100.06018.73
5.4.350.0130.05718.55
5.4.340.0100.05718.52
5.4.320.0040.03812.52
5.4.310.0100.03412.52
5.4.300.0080.05012.52
5.4.290.0110.05112.51
5.4.280.0100.04912.41
5.4.270.0090.04912.41
5.4.260.0080.05312.41
5.4.250.0040.05712.41
5.4.240.0100.05012.41
5.4.230.0070.05412.40
5.4.220.0080.05212.39
5.4.210.0060.05312.40
5.4.200.0140.04712.39
5.4.190.0170.04312.39
5.4.180.0070.05312.39
5.4.170.0120.05012.40
5.4.160.0190.03812.39
5.4.150.0120.04512.39
5.4.140.0130.04712.07
5.4.130.0150.04112.07
5.4.120.0120.04712.02
5.4.110.0070.05212.02
5.4.100.0120.04412.02
5.4.90.0090.05112.02
5.4.80.0100.04712.02
5.4.70.0140.04412.02
5.4.60.0080.04412.02
5.4.50.0060.03912.02
5.4.40.0090.04912.01
5.4.30.0080.04912.00
5.4.20.0090.05012.00
5.4.10.0040.05412.00
5.4.00.0080.05311.49
5.3.290.0080.03712.80
5.3.280.0110.05012.71
5.3.270.0120.03412.72
5.3.260.0110.03612.72
5.3.250.0090.04112.72
5.3.240.0140.03712.72
5.3.230.0050.03912.71
5.3.220.0050.04212.68
5.3.210.0080.05512.68
5.3.200.0040.05712.68
5.3.190.0080.05112.68
5.3.180.0080.03912.67
5.3.170.0080.03612.66
5.3.160.0060.03812.67
5.3.150.0060.03812.68
5.3.140.0060.03712.66
5.3.130.0070.03912.66
5.3.120.0060.04012.66
5.3.110.0040.04312.66
5.3.100.0080.04212.13
5.3.90.0070.03612.12
5.3.80.0030.04012.11
5.3.70.0060.03912.11
5.3.60.0050.03812.09
5.3.50.0050.03712.04
5.3.40.0060.04812.04
5.3.30.0090.03612.00
5.3.20.0050.03811.78
5.3.10.0080.04211.74
5.3.00.0040.03911.73
5.2.170.0070.0399.23
5.2.160.0090.0379.23
5.2.150.0060.0429.23
5.2.140.0070.0409.23
5.2.130.0060.0409.19
5.2.120.0080.0329.19
5.2.110.0030.0379.20
5.2.100.0070.0359.20
5.2.90.0070.0379.19
5.2.80.0060.0399.19
5.2.70.0070.0469.19
5.2.60.0100.0419.14
5.2.50.0060.0349.11
5.2.40.0040.0329.08
5.2.30.0070.0329.06
5.2.20.0130.0239.05
5.2.10.0040.0308.96
5.2.00.0060.0348.82
5.1.60.0050.0338.10
5.1.50.0120.0288.10
5.1.40.0040.0288.08
5.1.30.0050.0308.43
5.1.20.0080.0318.45
5.1.10.0040.0368.18
5.1.00.0060.0278.18
5.0.50.0040.0256.66
5.0.40.0040.0286.52
5.0.30.0050.0476.33
5.0.20.0040.0276.30
5.0.10.0020.0256.28
5.0.00.0030.0336.27
4.4.90.0030.0174.78
4.4.80.0030.0174.76
4.4.70.0060.0174.75
4.4.60.0040.0204.75
4.4.50.0070.0184.77
4.4.40.0040.0314.71
4.4.30.0040.0204.76
4.4.20.0050.0214.84
4.4.10.0040.0214.85
4.4.00.0040.0314.75
4.3.110.0020.0214.67
4.3.100.0040.0204.67
4.3.90.0030.0194.63
4.3.80.0020.0264.59
4.3.70.0080.0144.63
4.3.60.0060.0184.63
4.3.50.0050.0164.63
4.3.40.0030.0324.54
4.3.30.0040.0183.32
4.3.20.0010.0243.30
4.3.10.0040.0203.26
4.3.00.0130.0237.44

preferences:
75.25 ms | 401 KiB | 5 Q