3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('str_split')) { function str_split($text, $split = 1){ //place each character of the string into and array $array = array(); for($i=0; $i < strlen($text); $i++){ $key = NULL; for ($j = 0; $j < $split; $j++){ $key .= $text[$i]; } array_push($array, $key); } return $array; } } function hex_dump($data, $newline = "\n") { static $from = ''; static $to = ''; static $idxOffset = 8; static $width = 16; # number of bytes per line static $pad = '.'; # padding for non-visible characters static $hexPad = '00'; static $repeatHeadline = 5; if ($from === '') { for ($i = 0; $i <= 0xFF; ++$i) { $from .= chr($i); $to .= ($i >= 0x20 && $i <= 0x7E) ? chr($i) : $pad; } } $text = true; echo ($text) ? '' : '<pre>'; $head = str_repeat(' ', $idxOffset).' | '. implode(' ', array_map( create_function( '$str', 'return sprintf("%2X", $str);' ), range(0, $width - 1) )).' | '.(str_pad('', $width, '0123456789abcdef')).$newline; $separator = str_repeat('-', $idxOffset + 1).'+'.str_repeat('-', 3 * $width + 1).'+'. str_repeat('-', $width + 1).$newline; echo $head.$separator; $hex = str_split(bin2hex($data), $width * 2); $chars = str_split(strtr($data, $from, $to), $width); $hexLineBase = array_fill(0, $width, $hexPad); $offset = $c = 0; foreach ($hex as $i => $line) { $hexLine = str_split($line, 2) + $hexLineBase; $strLine = $chars[$i].str_repeat($pad, $width - strlen($chars[$i])); $line = sprintf('%'.$idxOffset.'X', $offset) . ' | ' . implode(' ', $hexLine) . ' | ' . $strLine . $newline; echo ($text) ? $line : htmlspecialchars($line); $offset += $width; if (++$c == $repeatHeadline) { echo $separator.$head.$separator; $c = 0; } } echo ($text) ? $newline.$newline : '<pre>'; } hex_dump(' \t\n\r\x0B'); hex_dump(" \t\n\r\x0B");

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.0110.00418.56
8.3.50.0100.01321.99
8.3.40.0060.00918.84
8.3.30.0070.00719.01
8.3.20.0040.00420.29
8.3.10.0040.00423.48
8.3.00.0070.00419.63
8.2.180.0080.00816.88
8.2.170.0070.01022.96
8.2.160.0040.01119.21
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.03
8.2.110.0100.00720.47
8.2.100.0060.00918.16
8.2.90.0040.00419.17
8.2.80.0000.00917.97
8.2.70.0000.00817.75
8.2.60.0060.00318.03
8.2.50.0030.00518.07
8.2.40.0080.00018.14
8.2.30.0050.00218.16
8.2.20.0000.00717.83
8.2.10.0070.00018.08
8.2.00.0080.00317.77
8.1.280.0070.01425.92
8.1.270.0060.00323.89
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0000.01022.68
8.1.230.0080.00419.25
8.1.220.0080.00017.79
8.1.210.0080.00018.77
8.1.200.0040.00717.35
8.1.190.0030.00517.35
8.1.180.0050.00218.10
8.1.170.0050.00318.72
8.1.160.0060.00322.05
8.1.150.0050.00218.99
8.1.140.0040.00417.59
8.1.130.0000.00917.87
8.1.120.0040.00417.42
8.1.110.0030.00617.40
8.1.100.0030.00517.49
8.1.90.0040.00417.55
8.1.80.0000.00817.52
8.1.70.0040.00417.40
8.1.60.0040.00417.63
8.1.50.0000.00917.58
8.1.40.0080.00017.42
8.1.30.0000.00917.62
8.1.20.0000.00817.63
8.1.10.0020.00517.67
8.1.00.0030.00517.43
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0030.00518.50
8.0.270.0090.00017.21
8.0.260.0040.00417.32
8.0.250.0070.00017.13
8.0.240.0000.00716.96
8.0.230.0030.00316.98
8.0.220.0040.00417.00
8.0.210.0040.00416.89
8.0.200.0030.00316.90
8.0.190.0040.00417.09
8.0.180.0050.00217.08
8.0.170.0040.00416.92
8.0.160.0030.00516.88
8.0.150.0040.00417.00
8.0.140.0000.00816.98
8.0.130.0060.00013.39
8.0.120.0040.00416.86
8.0.110.0050.00216.98
8.0.100.0000.00716.89
8.0.90.0040.00416.93
8.0.80.0120.00316.93
8.0.70.0020.00517.03
8.0.60.0050.00316.85
8.0.50.0070.00016.87
8.0.30.0100.01016.96
8.0.20.0090.01417.40
8.0.10.0030.00616.98
8.0.00.0120.00716.66
7.4.330.0060.00015.24
7.4.320.0030.00316.75
7.4.300.0040.00416.56
7.4.290.0000.00816.69
7.4.280.0030.00816.43
7.4.270.0030.00316.73
7.4.260.0040.00416.62
7.4.250.0040.00416.71
7.4.240.0070.00016.68
7.4.230.0040.00416.43
7.4.220.0100.01416.51
7.4.210.0070.01416.80
7.4.200.0050.00316.53
7.4.160.0140.00516.46
7.4.150.0110.00817.40
7.4.140.0090.00917.86
7.4.130.0070.01016.48
7.4.120.0120.00816.56
7.4.110.0050.01316.54
7.4.100.0130.00416.57
7.4.90.0090.01016.52
7.4.80.0200.00619.39
7.4.70.0030.01316.50
7.4.60.0140.00316.70
7.4.50.0040.00416.34
7.4.40.0100.01416.62
7.4.30.0100.00616.75
7.4.00.0090.00614.97
7.3.330.0050.00313.43
7.3.320.0000.00513.49
7.3.310.0050.00216.43
7.3.300.0040.00416.43
7.3.290.0060.00916.44
7.3.280.0120.00716.45
7.3.270.0090.00917.40
7.3.260.0130.01316.64
7.3.250.0060.01116.46
7.3.240.0130.00316.52
7.3.230.0090.00916.48
7.3.210.0170.00316.34
7.3.200.0080.01219.39
7.3.190.0130.00316.44
7.3.180.0130.00316.48
7.3.170.0070.01016.50
7.3.160.0130.01016.63
7.3.120.0070.01015.02
7.3.110.0060.00614.96
7.3.100.0060.00914.90
7.3.90.0030.00714.88
7.3.80.0070.01014.88
7.3.70.0030.01415.06
7.3.60.0040.01114.93
7.3.50.0110.00014.97
7.3.40.0100.00614.80
7.3.30.0030.01315.05
7.3.20.0130.00316.82
7.3.10.0080.00916.62
7.3.00.0100.00716.53
7.2.330.0090.01216.59
7.2.320.0160.00316.89
7.2.310.0060.01216.91
7.2.300.0120.00416.55
7.2.290.0120.00916.90
7.2.240.0000.01915.16
7.2.230.0000.01415.41
7.2.220.0090.00615.29
7.2.210.0040.01115.20
7.2.200.0100.00615.20
7.2.190.0120.00415.07
7.2.180.0030.01415.08
7.2.170.0070.01015.16
7.2.160.0060.01315.34
7.2.150.0120.00616.92
7.2.140.0040.00816.99
7.2.130.0130.00416.88
7.2.120.0050.00916.88
7.2.110.0090.00616.96
7.2.100.0080.01116.89
7.2.90.0040.01316.85
7.2.80.0070.01217.02
7.2.70.0120.00416.72
7.2.60.0070.01016.84
7.2.50.0060.01116.91
7.2.40.0130.00316.82
7.2.30.0110.00716.93
7.2.20.0090.01016.80
7.2.10.0080.00816.82
7.2.00.0070.01217.92
7.1.330.0110.00615.96
7.1.320.0030.01315.91
7.1.310.0060.00915.65
7.1.300.0060.00915.44
7.1.290.0110.00415.84
7.1.280.0090.00615.97
7.1.270.0040.01415.77
7.1.260.0090.00615.83
7.1.250.0080.00715.82
7.1.200.0080.00615.95
7.1.100.0920.01016.11
7.1.70.0000.00716.89
7.1.60.0100.01619.32
7.1.50.0030.01016.75
7.1.00.0030.07722.51
7.0.200.0000.00816.76
7.0.140.0070.06721.94
7.0.60.0130.07719.96
7.0.50.0030.04017.92
7.0.40.0030.05720.13
7.0.30.0430.07720.06
7.0.20.0230.07720.19
7.0.10.0030.06320.06
7.0.00.0030.04320.22
5.6.280.0000.07720.82
5.6.210.0100.07320.50
5.6.200.0030.09318.22
5.6.190.0030.08020.63
5.6.180.0270.03320.58
5.6.170.0270.04320.45
5.6.160.0070.03720.55
5.6.150.0130.07018.18
5.6.140.0070.03718.17
5.6.130.0070.08018.14
5.6.120.0030.06021.03
5.6.110.0100.08320.98
5.6.100.0100.07721.03
5.6.90.0070.06721.00
5.6.80.0070.05720.47
5.5.350.0130.04020.46
5.5.340.0000.05718.05
5.5.330.0130.07720.13
5.5.320.0430.05320.31
5.5.310.0500.03720.37
5.5.300.0030.03718.08
5.5.290.0070.06017.98
5.5.280.0030.05020.91
5.5.270.0100.08320.81
5.5.260.0070.08721.00
5.5.250.0030.08020.77
5.5.240.0200.07020.18
5.4.450.0730.06019.70
5.4.440.0770.04719.55
5.4.430.0300.06719.58
5.4.420.0670.00019.51
5.4.410.0670.00019.32
5.4.400.0670.00019.16
5.4.390.0600.00019.16
5.4.380.0630.00019.02
5.4.370.0630.00019.04
5.4.360.0630.00019.02
5.4.350.0630.00019.11
5.4.340.0070.03512.05
5.4.320.0070.04012.54
5.4.310.0070.04112.53
5.4.300.0060.03612.54
5.4.290.0050.03912.54
5.4.280.0090.03312.44
5.4.270.0050.03812.44
5.4.260.0090.03512.44
5.4.250.0050.03812.43
5.4.240.0010.04012.43
5.4.230.0070.03812.42
5.4.220.0060.03912.43
5.4.210.0090.03312.43
5.4.200.0050.04012.43
5.4.190.0070.03612.43
5.4.180.0080.03412.42
5.4.170.0070.05012.43
5.4.160.0060.04412.43
5.4.150.0100.03612.43
5.4.140.0090.03812.11
5.4.130.0060.04112.09
5.4.120.0060.03712.05
5.4.110.0090.03412.05
5.4.100.0070.03912.05
5.4.90.0060.04112.04
5.4.80.0070.04212.05
5.4.70.0070.03512.04
5.4.60.0090.03212.04
5.4.50.0070.03712.05
5.4.40.0060.03712.04
5.4.30.0050.03712.03
5.4.20.0110.03112.03
5.4.10.0060.03612.03
5.4.00.0050.03811.52
5.3.290.0070.04212.80
5.3.280.0070.03912.72
5.3.270.0080.03812.73
5.3.260.0070.03912.74
5.3.250.0030.04212.73
5.3.240.0120.05212.73
5.3.230.0020.04512.73
5.3.220.0080.04912.70
5.3.210.0100.04912.70
5.3.200.0100.05512.69
5.3.190.0070.05312.70
5.3.180.0110.04012.69
5.3.170.0100.05212.69
5.3.160.0100.04712.69
5.3.150.0070.04112.69
5.3.140.0110.03612.68
5.3.130.0090.04512.67
5.3.120.0090.03912.68
5.3.110.0050.04512.68
5.3.100.0040.04512.16
5.3.90.0090.04612.14
5.3.80.0060.04312.14
5.3.70.0050.03912.14
5.3.60.0070.03612.12
5.3.50.0080.03612.07
5.3.40.0050.04512.07
5.3.30.0030.03812.03
5.3.20.0080.03411.81
5.3.10.0080.03311.77
5.3.00.0080.03511.77
5.2.170.0080.0279.27
5.2.160.0020.0349.27
5.2.150.0070.0289.27
5.2.140.0070.0359.27
5.2.130.0040.0319.22
5.2.120.0020.0329.23
5.2.110.0050.0309.23
5.2.100.0070.0269.23
5.2.90.0050.0299.23
5.2.80.0050.0349.22
5.2.70.0100.0349.22
5.2.60.0070.0339.18
5.2.50.0060.0329.15
5.2.40.0050.0339.13
5.2.30.0060.0289.10
5.2.20.0030.0319.09
5.2.10.0040.0289.00
5.2.00.0080.0328.86
5.1.60.0060.0278.14
5.1.50.0030.0278.13
5.1.40.0020.0288.12
5.1.30.0040.0278.47
5.1.20.0050.0348.49
5.1.10.0040.0268.21
5.1.00.0030.0278.21
5.0.50.0020.0246.71
5.0.40.0070.0166.57
5.0.30.0030.0336.38
5.0.20.0050.0226.35
5.0.10.0030.0266.32
5.0.00.0050.0306.32
4.4.90.0050.0184.78
4.4.80.0050.0184.75
4.4.70.0040.0244.76
4.4.60.0020.0224.75
4.4.50.0050.0224.77
4.4.40.0020.0304.74
4.4.30.0020.0204.76
4.4.20.0020.0204.84
4.4.10.0010.0224.85
4.4.00.0070.0314.77
4.3.110.0070.0144.66
4.3.100.0050.0184.66
4.3.90.0030.0214.63
4.3.80.0030.0324.64
4.3.70.0040.0174.63
4.3.60.0060.0204.64
4.3.50.0030.0214.63
4.3.40.0080.0304.58
4.3.30.0020.0243.40
4.3.20.0030.0223.38
4.3.10.0040.0193.32
4.3.00.0070.0207.13

preferences:
44.88 ms | 401 KiB | 5 Q