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) 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.0150.00616.61
8.3.50.0030.01222.04
8.3.40.0110.00418.92
8.3.30.0100.00719.09
8.3.20.0040.00420.30
8.3.10.0050.00323.48
8.3.00.0040.00419.18
8.2.180.0110.00418.16
8.2.170.0060.00922.96
8.2.160.0100.00320.38
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0000.00820.98
8.2.110.0070.00320.94
8.2.100.0040.00817.84
8.2.90.0040.00419.39
8.2.80.0050.00317.97
8.2.70.0040.00417.75
8.2.60.0040.00418.05
8.2.50.0030.00918.07
8.2.40.0050.00320.07
8.2.30.0040.00418.26
8.2.20.0080.00017.77
8.2.10.0040.00418.27
8.2.00.0050.00317.88
8.1.280.0080.00625.92
8.1.270.0090.00023.92
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0000.00921.37
8.1.230.0100.00317.45
8.1.220.0040.00417.79
8.1.210.0030.00518.77
8.1.200.0050.00517.35
8.1.190.0000.00817.22
8.1.180.0060.00318.10
8.1.170.0050.00518.64
8.1.160.0000.00722.05
8.1.150.0080.00018.64
8.1.140.0000.00817.48
8.1.130.0000.00717.80
8.1.120.0040.00417.57
8.1.110.0100.00017.52
8.1.100.0000.00717.57
8.1.90.0000.00817.40
8.1.80.0050.00217.56
8.1.70.0030.00317.54
8.1.60.0040.00417.65
8.1.50.0040.00417.62
8.1.40.0000.00917.53
8.1.30.0040.00417.62
8.1.20.0050.00317.73
8.1.10.0050.00317.57
8.1.00.0000.00817.48
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0040.00318.53
8.0.270.0030.00317.22
8.0.260.0000.00717.41
8.0.250.0000.00717.04
8.0.240.0040.00417.04
8.0.230.0030.00317.06
8.0.220.0030.00516.96
8.0.210.0000.00716.96
8.0.200.0060.00016.99
8.0.190.0000.00716.96
8.0.180.0050.00316.95
8.0.170.0000.00716.91
8.0.160.0030.00316.89
8.0.150.0030.00316.91
8.0.140.0060.00316.84
8.0.130.0030.00313.38
8.0.120.0000.00816.98
8.0.110.0040.00416.90
8.0.100.0030.00516.77
8.0.90.0080.00016.93
8.0.80.0030.01416.96
8.0.70.0030.00517.02
8.0.60.0040.00416.96
8.0.50.0000.00716.88
8.0.30.0150.00317.20
8.0.20.0080.01117.40
8.0.10.0050.00316.93
8.0.00.0100.01016.93
7.4.330.0050.00015.16
7.4.320.0000.00616.63
7.4.300.0000.00716.68
7.4.290.0070.00016.54
7.4.280.0030.00616.68
7.4.270.0000.00716.52
7.4.260.0030.00316.57
7.4.250.0040.00416.58
7.4.240.0020.00516.54
7.4.230.0020.00516.47
7.4.220.0100.01016.62
7.4.210.0080.00816.60
7.4.200.0040.00416.50
7.4.190.0070.00016.60
7.4.160.0080.00816.45
7.4.150.0150.00317.40
7.4.140.0090.01217.86
7.4.130.0080.01116.66
7.4.120.0090.00916.55
7.4.110.0100.01316.45
7.4.100.0210.00016.48
7.4.90.0170.00616.56
7.4.80.0130.00819.39
7.4.70.0070.01516.50
7.4.60.0180.00516.71
7.4.50.0000.00816.59
7.4.40.0060.01216.68
7.4.30.0050.01116.59
7.4.00.0030.01215.06
7.3.330.0050.00013.43
7.3.320.0020.00213.49
7.3.310.0050.00316.47
7.3.300.0030.00316.41
7.3.290.0130.00916.43
7.3.280.0080.00816.38
7.3.270.0130.00317.40
7.3.260.0140.01116.59
7.3.250.0160.00516.53
7.3.240.0080.00916.68
7.3.230.0060.01516.42
7.3.210.0130.00316.64
7.3.200.0140.01019.39
7.3.190.0090.01216.56
7.3.180.0100.00716.32
7.3.170.0120.00916.65
7.3.160.0090.00616.73
7.3.120.0070.01015.00
7.3.110.0070.00714.76
7.3.100.0030.01614.91
7.3.90.0060.00915.07
7.3.80.0080.00414.59
7.3.70.0040.01114.72
7.3.60.0040.00814.80
7.3.50.0060.00614.82
7.3.40.0060.01014.67
7.3.30.0030.00614.98
7.3.20.0030.01116.68
7.3.10.0090.00616.51
7.3.00.0070.00716.45
7.2.330.0090.01916.58
7.2.320.0140.00316.81
7.2.310.0070.01116.71
7.2.300.0100.01316.55
7.2.290.0170.00316.70
7.2.250.0090.00915.05
7.2.240.0060.00915.09
7.2.230.0030.01615.24
7.2.220.0000.01515.07
7.2.210.0100.00615.10
7.2.200.0030.00915.04
7.2.190.0090.00014.69
7.2.180.0070.00715.21
7.2.170.0030.01315.20
7.2.130.0100.00716.88
7.2.120.0140.00316.79
7.2.110.0120.00916.64
7.2.100.0180.01517.02
7.2.90.0210.00916.96
7.2.80.0130.01616.63
7.2.70.0120.00916.88
7.2.60.0090.00716.92
7.2.50.0060.01117.02
7.2.40.0120.00617.01
7.2.30.0130.01316.57
7.2.20.0150.01116.64
7.2.10.0100.01017.01
7.2.00.0070.01118.10
7.1.330.0060.00616.05
7.1.320.0000.00915.87
7.1.310.0040.01115.82
7.1.300.0070.00715.98
7.1.290.0110.00415.91
7.1.280.0050.00515.80
7.1.270.0110.00415.99
7.1.260.0070.00715.89
7.1.250.0030.01015.63
7.1.240.0090.00815.72
7.1.230.0140.01115.91
7.1.220.0160.00815.91
7.1.210.0150.01515.77
7.1.200.0090.00915.77
7.1.190.0190.00815.92
7.1.180.0100.01015.73
7.1.170.0140.00715.38
7.1.160.0120.00615.75
7.1.150.0120.01215.84
7.1.140.0080.01215.53
7.1.130.0080.01115.48
7.1.120.0070.00715.79
7.1.110.0120.00615.92
7.1.100.0220.00816.62
7.1.90.0110.00715.45
7.1.80.0060.01215.74
7.1.70.0080.00616.49
7.1.60.0060.01017.65
7.1.50.0210.00925.35
7.1.40.0130.00715.72
7.1.30.0100.00515.57
7.1.20.0150.00315.23
7.1.10.0080.01115.67
7.1.00.0080.04119.00
7.0.330.0060.00915.03
7.0.320.0180.01215.57
7.0.310.0060.01015.00
7.0.300.0160.00415.23
7.0.290.0200.00015.33
7.0.280.0100.00615.13
7.0.270.0130.00715.51
7.0.260.0100.00715.38
7.0.250.0110.00715.36
7.0.240.0170.00315.10
7.0.230.0150.00315.39
7.0.220.0100.00715.25
7.0.210.0120.00315.37
7.0.200.0060.00816.01
7.0.190.0100.00714.98
7.0.180.0120.00315.31
7.0.170.0100.00715.25
7.0.160.0140.00715.33
7.0.150.0120.00615.54
7.0.140.0070.04018.51
7.0.130.0030.01015.29
7.0.120.0180.00315.08
7.0.110.0120.00915.18
7.0.100.0130.00315.46
7.0.90.0120.00615.14
7.0.80.0100.00715.20
7.0.70.0130.00315.52
7.0.60.0070.03417.64
7.0.50.0050.03216.54
7.0.40.0070.04716.74
7.0.30.0150.02316.79
7.0.20.0150.02616.59
7.0.10.0070.03516.74
7.0.00.0090.02416.85
5.6.380.0150.01014.53
5.6.370.0040.01214.51
5.6.360.0030.01414.42
5.6.350.0070.01414.64
5.6.340.0070.00714.39
5.6.330.0040.01514.20
5.6.320.0090.00314.23
5.6.310.0000.01514.34
5.6.300.0110.00514.58
5.6.290.0030.00814.58
5.6.280.0060.03917.48
5.6.270.0040.00414.08
5.6.260.0040.00414.27
5.6.250.0090.00614.18
5.6.240.0070.00714.22
5.6.230.0040.01114.13
5.6.220.0000.01814.67
5.6.210.0080.04217.41
5.6.200.0030.04016.22
5.6.190.0090.03617.52
5.6.180.0110.04317.35
5.6.170.0200.03417.42
5.6.160.0050.03417.35
5.6.150.0050.04516.25
5.6.140.0030.02816.22
5.6.130.0070.02416.31
5.6.120.0070.02617.91
5.6.110.0090.02417.62
5.6.100.0060.04717.55
5.6.90.0050.03417.76
5.6.80.0070.04417.33
5.6.70.0070.00714.43
5.6.60.0040.01114.34
5.6.50.0080.01414.70
5.6.40.0070.00714.49
5.6.30.0060.01314.03
5.6.20.0100.01314.14
5.6.10.0140.00714.54
5.6.00.0100.01014.74
5.5.380.0060.00611.21
5.5.370.0000.00611.13
5.5.360.0030.00611.29
5.5.350.0050.04715.79
5.5.340.0030.04414.73
5.5.330.0040.03315.86
5.5.320.0150.03515.83
5.5.310.0180.03815.73
5.5.300.0070.03414.56
5.5.290.0030.04214.43
5.5.280.0100.04515.94
5.5.270.0030.02515.77
5.5.260.0120.03716.10
5.5.250.0030.04115.82
5.5.240.0070.04215.59
5.5.230.0030.00911.34
5.5.220.0000.01310.89
5.5.210.0000.01311.04
5.5.200.0060.00311.07
5.5.190.0000.01011.20
5.5.180.0100.00611.30
5.5.170.0150.00411.35
5.5.160.0070.01011.17
5.5.150.0110.00311.04
5.5.140.0130.00311.17
5.5.130.0070.01011.04
5.5.120.0110.00311.20
5.5.110.0080.00811.48
5.5.100.0130.00311.34
5.5.90.0080.01011.27
5.5.80.0050.01111.44
5.5.70.0080.00811.41
5.5.60.0080.00811.36
5.5.50.0060.00910.93
5.5.40.0190.00011.28
5.5.30.0060.00611.30
5.5.20.0100.00711.23
5.5.10.0040.00911.20
5.5.00.0090.00611.36
5.4.450.0210.03815.20
5.4.440.0320.03515.33
5.4.430.0440.04315.41
5.4.420.0550.04215.32
5.4.410.0540.03415.30
5.4.400.0120.02815.12
5.4.390.0550.04115.11
5.4.380.0090.03014.90
5.4.370.0080.03114.79
5.4.360.0120.03215.02
5.4.350.0120.02815.01
5.4.340.0060.03414.93
5.4.330.0080.00410.76
5.4.320.0050.02311.79
5.4.310.0080.02311.83
5.4.300.0100.02411.75
5.4.290.0100.02511.82
5.4.280.0100.02411.80
5.4.270.0090.02611.70
5.4.260.0090.02811.75
5.4.250.0130.02511.76
5.4.240.0110.02511.58
5.4.230.0080.02911.78
5.4.220.0080.02811.53
5.4.210.0090.02711.70
5.4.200.0110.02711.80
5.4.190.0070.03011.67
5.4.180.0050.03011.69
5.4.170.0080.02811.61
5.4.160.0040.03011.69
5.4.150.0040.02911.58
5.4.140.0090.02611.51
5.4.130.0040.02911.57
5.4.120.0060.03111.76
5.4.110.0090.03111.40
5.4.100.0100.02411.63
5.4.90.0060.02911.56
5.4.80.0100.02511.56
5.4.70.0070.02611.46
5.4.60.0070.02811.42
5.4.50.0100.02811.42
5.4.40.0040.02911.27
5.4.30.0060.03011.56
5.4.20.0070.02911.42
5.4.10.0090.02511.29
5.4.00.0060.02911.22
5.3.290.0060.02311.63
5.3.280.0060.03111.53
5.3.270.0070.03211.58
5.3.260.0090.03411.63
5.3.250.0070.03111.61
5.3.240.0090.02511.59
5.3.230.0060.02611.72
5.3.220.0040.03111.49
5.3.210.0050.03111.62
5.3.200.0050.02811.59
5.3.190.0080.03311.67
5.3.180.0100.04111.70
5.3.170.0080.02711.57
5.3.160.0060.03211.57
5.3.150.0060.02811.71
5.3.140.0010.02811.56
5.3.130.0070.02811.55
5.3.120.0050.02711.65
5.3.110.0050.03011.51
5.3.100.0060.02911.36
5.3.90.0070.02711.40
5.3.80.0050.02911.32
5.3.70.0120.02311.35
5.3.60.0090.02611.40
5.3.50.0080.02211.34
5.3.40.0090.02211.29
5.3.30.0020.02811.33
5.3.20.0050.02411.07
5.3.10.0060.02411.08
5.3.00.0090.02310.98
5.2.170.0030.0249.53
5.2.160.0040.0209.50
5.2.150.0030.0209.55
5.2.140.0040.0219.34
5.2.130.0050.0199.48
5.2.120.0040.0239.49
5.2.110.0070.0189.49
5.2.100.0050.0189.51
5.2.90.0030.0209.36
5.2.80.0090.0179.33
5.2.70.0050.0219.29
5.2.60.0070.0239.39
5.2.50.0060.0199.35
5.2.40.0080.0209.38
5.2.30.0060.0199.33
5.2.20.0040.0199.30
5.2.10.0050.0189.19
5.2.00.0040.0229.17
5.1.60.0050.0158.50
5.1.50.0020.0168.49
5.1.40.0040.0178.48
5.1.30.0020.0208.69
5.1.20.0050.0188.67
5.1.10.0060.0168.53
5.1.00.0040.0168.53
5.0.50.0060.0127.77
5.0.40.0050.0127.71
5.0.30.0050.0177.61
5.0.20.0060.0107.59
5.0.10.0020.0167.58
5.0.00.0030.0197.58
4.4.90.0030.0116.83
4.4.80.0010.0126.82
4.4.70.0030.0126.82
4.4.60.0030.0126.82
4.4.50.0030.0136.83
4.4.40.0030.0176.80
4.4.30.0030.0126.82
4.4.20.0030.0106.86
4.4.10.0020.0126.87
4.4.00.0040.0156.82
4.3.110.0030.0116.78
4.3.100.0020.0136.77
4.3.90.0030.0146.76
4.3.80.0050.0176.73
4.3.70.0040.0106.76
4.3.60.0020.0156.76
4.3.50.0030.0136.75
4.3.40.0050.0176.71
4.3.30.0020.0136.10
4.3.20.0050.0106.09
4.3.10.0030.0116.07
4.3.00.0090.0148.16

preferences:
39.56 ms | 401 KiB | 5 Q