3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(! function_exists('str_split')) { function str_split($text, $split = 1) { $array = array(); for ($i = 0; $i < strlen($text);) { $array[] = substr($text, $i, $split); $i += $split; } 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.0040.01118.43
8.3.50.0140.00522.01
8.3.40.0090.00618.67
8.3.30.0030.01019.16
8.3.20.0040.00420.29
8.3.10.0040.00423.40
8.3.00.0000.01117.75
8.2.180.0090.00918.22
8.2.170.0070.00722.96
8.2.160.0100.00320.55
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00022.14
8.2.110.0060.00321.04
8.2.100.0040.00818.03
8.2.90.0060.00318.03
8.2.80.0080.00017.97
8.2.70.0030.00617.50
8.2.60.0000.00817.77
8.2.50.0060.00318.07
8.2.40.0080.00018.34
8.2.30.0040.00418.07
8.2.20.0090.00017.90
8.2.10.0000.00818.03
8.2.00.0040.00417.91
8.1.280.0180.00425.92
8.1.270.0030.00623.87
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0040.00722.18
8.1.230.0040.00820.89
8.1.220.0050.00317.74
8.1.210.0030.00618.90
8.1.200.0070.00319.01
8.1.190.0040.00417.22
8.1.180.0060.00318.10
8.1.170.0000.00818.70
8.1.160.0000.00721.91
8.1.150.0040.00418.92
8.1.140.0050.00217.59
8.1.130.0080.00017.87
8.1.120.0000.00717.53
8.1.110.0000.00717.36
8.1.100.0030.00417.32
8.1.90.0050.00317.45
8.1.80.0040.00417.53
8.1.70.0000.00717.42
8.1.60.0030.00617.44
8.1.50.0030.00617.43
8.1.40.0030.00517.57
8.1.30.0040.00417.71
8.1.20.0030.00617.67
8.1.10.0000.00717.47
8.1.00.0000.00817.42
8.0.300.0040.00420.04
8.0.290.0000.00816.63
8.0.280.0070.00018.52
8.0.270.0080.00018.16
8.0.260.0000.00718.44
8.0.250.0000.00717.12
8.0.240.0030.00317.00
8.0.230.0080.00017.08
8.0.220.0000.00716.92
8.0.210.0080.00016.98
8.0.200.0030.00317.02
8.0.190.0040.00417.05
8.0.180.0080.00017.04
8.0.170.0030.00616.90
8.0.160.0030.00516.98
8.0.150.0000.00716.89
8.0.140.0000.00717.02
8.0.130.0000.00613.28
8.0.120.0050.00316.85
8.0.110.0070.00016.92
8.0.100.0000.00716.93
8.0.90.0050.00216.81
8.0.80.0090.01217.02
8.0.70.0040.00416.86
8.0.60.0040.00416.85
8.0.50.0040.00416.83
8.0.30.0080.01317.27
8.0.20.0080.01117.40
8.0.10.0000.00716.99
8.0.00.0140.00316.93
7.4.330.0050.00015.00
7.4.320.0000.00616.63
7.4.300.0070.00016.68
7.4.290.0080.00016.61
7.4.280.0050.00516.60
7.4.270.0030.00316.69
7.4.260.0030.00316.60
7.4.250.0040.00416.55
7.4.240.0000.00716.56
7.4.230.0000.00716.40
7.4.220.0080.01216.63
7.4.210.0070.00716.54
7.4.200.0050.00316.77
7.4.160.0070.01016.79
7.4.150.0100.01017.40
7.4.140.0130.00717.86
7.4.130.0120.00716.71
7.4.120.0120.00716.63
7.4.110.0160.00616.56
7.4.100.0140.00416.70
7.4.90.0030.01316.53
7.4.80.0150.00919.39
7.4.70.0150.00516.79
7.4.60.0000.01816.59
7.4.50.0060.00316.56
7.4.40.0090.01216.63
7.4.30.0040.01716.20
7.4.00.0000.01515.19
7.3.330.0040.00413.40
7.3.320.0000.00613.43
7.3.310.0030.00316.31
7.3.300.0000.00716.35
7.3.290.0110.00416.41
7.3.280.0060.01116.45
7.3.270.0060.01217.40
7.3.260.0180.00916.52
7.3.250.0050.01216.67
7.3.240.0090.00916.58
7.3.230.0160.00316.61
7.3.210.0110.01216.55
7.3.200.0110.00819.39
7.3.190.0160.02016.44
7.3.180.0140.00716.66
7.3.170.0070.01016.47
7.3.160.0060.01516.57
7.3.120.0060.01314.93
7.3.110.0100.00714.84
7.3.100.0070.01115.03
7.3.90.0130.00315.11
7.3.80.0090.00314.61
7.3.70.0060.00315.02
7.3.60.0070.00314.96
7.3.50.0110.00314.97
7.3.40.0030.00714.85
7.3.30.0050.00514.74
7.3.20.0030.00916.71
7.3.10.0000.01416.44
7.3.00.0040.01116.57
7.2.330.0030.01516.62
7.2.320.0060.01216.48
7.2.310.0100.00616.86
7.2.300.0000.01616.75
7.2.290.0100.00716.61
7.2.240.0060.01214.89
7.2.230.0070.00714.75
7.2.220.0060.00915.25
7.2.210.0000.01515.24
7.2.200.0030.00615.21
7.2.190.0040.00814.84
7.2.180.0120.00614.83
7.2.170.0030.01315.08
7.2.160.0110.00615.31
7.2.150.0060.00916.57
7.2.140.0080.00816.93
7.2.130.0040.01216.88
7.2.120.0030.00717.02
7.2.110.0000.01117.04
7.2.100.0040.01116.85
7.2.90.0030.00816.80
7.2.80.0060.01017.04
7.2.70.0110.00017.10
7.2.60.0020.01216.94
7.2.50.0120.00617.03
7.2.40.0060.00916.84
7.2.30.0070.01017.05
7.2.20.0030.01017.01
7.2.10.0030.01216.79
7.2.00.0060.01018.18
7.1.330.0040.01115.84
7.1.320.0040.01115.95
7.1.310.0100.00715.47
7.1.300.0030.00615.79
7.1.290.0060.00915.74
7.1.280.0040.01115.86
7.1.270.0080.00415.68
7.1.260.0000.01415.95
7.1.250.0030.01315.61
7.1.200.0070.00316.00
7.1.100.0980.00316.35
7.1.70.0000.01017.21
7.1.60.0030.02019.32
7.1.50.0180.02134.49
7.1.00.0030.07722.55
7.0.200.0040.00416.73
7.0.140.0030.07322.10
7.0.60.0270.08020.05
7.0.50.0070.08018.00
7.0.40.0130.07019.96
7.0.30.0200.04720.27
7.0.20.0230.08720.10
7.0.10.0000.05020.19
7.0.00.0070.05720.07
5.6.280.0030.07320.85
5.6.210.0130.07720.55
5.6.200.0030.05718.29
5.6.190.0070.09020.51
5.6.180.0230.07720.61
5.6.170.0400.04020.44
5.6.160.0100.08020.55
5.6.150.0000.09018.27
5.6.140.0070.08018.16
5.6.130.0030.08318.25
5.6.120.0070.05021.06
5.6.110.0070.08321.11
5.6.100.0200.07721.13
5.6.90.0100.03321.04
5.6.80.0100.05320.42
5.5.350.0170.08020.43
5.5.340.0170.03718.07
5.5.330.0070.07020.37
5.5.320.0370.05020.42
5.5.310.0330.07320.34
5.5.300.0100.06018.06
5.5.290.0030.04017.94
5.5.280.0030.04720.67
5.5.270.0100.06020.98
5.5.260.0030.04320.91
5.5.250.0030.07320.57
5.5.240.0070.03720.26
5.4.450.0600.07019.61
5.4.440.0730.05019.31
5.4.430.0530.06719.58
5.4.420.0700.00019.52
5.4.410.0770.00019.27
5.4.400.0630.00019.13
5.4.390.0630.00019.23
5.4.380.0900.00019.26
5.4.370.0630.00018.98
5.4.360.0670.00019.11
5.4.350.0630.00019.01
5.4.340.0090.03112.05
5.4.320.0110.03312.54
5.4.310.0060.04012.54
5.4.300.0060.03712.54
5.4.290.0070.03812.54
5.4.280.0050.03912.43
5.4.270.0060.03612.44
5.4.260.0110.03312.43
5.4.250.0050.03912.43
5.4.240.0060.03712.44
5.4.230.0070.04212.43
5.4.220.0050.04312.43
5.4.210.0050.04112.43
5.4.200.0100.03812.43
5.4.190.0070.04512.42
5.4.180.0030.04412.42
5.4.170.0070.03412.43
5.4.160.0050.03512.43
5.4.150.0080.03612.42
5.4.140.0070.03612.11
5.4.130.0060.03512.09
5.4.120.0070.03412.05
5.4.110.0030.03812.05
5.4.100.0100.03712.05
5.4.90.0070.03912.05
5.4.80.0050.03812.05
5.4.70.0040.04112.04
5.4.60.0080.03412.05
5.4.50.0050.03912.04
5.4.40.0090.03112.03
5.4.30.0080.03212.03
5.4.20.0040.03612.02
5.4.10.0080.04512.03
5.4.00.0130.03911.52
5.3.290.0060.03912.80
5.3.280.0070.03912.73
5.3.270.0060.03912.73
5.3.260.0040.04012.73
5.3.250.0060.03612.73
5.3.240.0080.03512.73
5.3.230.0050.03912.72
5.3.220.0060.03912.69
5.3.210.0060.03912.69
5.3.200.0080.03512.69
5.3.190.0080.03512.69
5.3.180.0070.03612.69
5.3.170.0030.04012.69
5.3.160.0030.04312.69
5.3.150.0050.04012.69
5.3.140.0020.04112.68
5.3.130.0060.04512.68
5.3.120.0050.03912.67
5.3.110.0060.03812.68
5.3.100.0060.03712.16
5.3.90.0030.03912.14
5.3.80.0060.03612.14
5.3.70.0070.03512.14
5.3.60.0070.04212.13
5.3.50.0070.03612.07
5.3.40.0040.04112.07
5.3.30.0040.03712.02
5.3.20.0050.03511.83
5.3.10.0040.03611.77
5.3.00.0050.03711.77
5.2.170.0030.0319.27
5.2.160.0050.0289.27
5.2.150.0040.0349.27
5.2.140.0050.0319.27
5.2.130.0030.0319.22
5.2.120.0030.0289.22
5.2.110.0070.0299.23
5.2.100.0020.0319.23
5.2.90.0060.0279.22
5.2.80.0030.0329.22
5.2.70.0020.0329.22
5.2.60.0050.0309.18
5.2.50.0060.0339.15
5.2.40.0020.0339.13
5.2.30.0060.0299.10
5.2.20.0040.0299.09
5.2.10.0040.0289.00
5.2.00.0030.0308.86
5.1.60.0060.0218.14
5.1.50.0050.0238.14
5.1.40.0080.0208.11
5.1.30.0050.0268.46
5.1.20.0060.0238.48
5.1.10.0030.0278.21
5.1.00.0020.0288.21
5.0.50.0010.0236.70
5.0.40.0040.0186.56
5.0.30.0040.0326.38
5.0.20.0020.0216.34
5.0.10.0020.0216.32
5.0.00.0020.0326.31
4.4.90.0030.0154.77
4.4.80.0020.0164.76
4.4.70.0030.0154.76
4.4.60.0030.0154.75
4.4.50.0060.0124.77
4.4.40.0020.0264.71
4.4.30.0020.0174.76
4.4.20.0040.0204.85
4.4.10.0040.0214.85
4.4.00.0020.0274.76
4.3.110.0020.0174.66
4.3.100.0030.0154.66
4.3.90.0020.0154.63
4.3.80.0020.0254.62
4.3.70.0010.0164.63
4.3.60.0030.0144.63
4.3.50.0040.0144.62
4.3.40.0000.0274.57
4.3.30.0010.0173.37
4.3.20.0030.0153.35
4.3.10.0000.0183.31
4.3.00.0030.0207.13

preferences:
42.44 ms | 401 KiB | 5 Q