3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Buffer extends \SplFixedArray { private function fill(string $data = '') { for ($i = 0, $l = $this->getSize(); $i < $l; $i++) { $this[$i] = $data[$i] ?? 0; } } public function __construct($arg) { if (\is_int($arg)) { parent::__construct($arg); $this->fill(); return; } if (\is_string($arg)) { parent::__construct(\strlen($arg)); $this->fill($arg); return; } } public function setSize($value) { throw new \Error('Buffer cannot be resized'); } public function offsetSet($index, $byte) { if (\is_int($byte) && $byte >= 0 && $byte <= 255) { parent::offsetSet($index, $byte); return; } if (!\is_string($byte) || \strlen($byte) != 1 || ($byte = \ord($byte)) < 0 || $byte > 255) { throw new \Error('Buffer element value must be integer in the range 0 - 255 or single-byte string'); } parent::offsetSet($index, $byte); } public function offsetUnset($index) { throw new \Error('Buffer elements cannot be unset'); } public function __toString() { return \implode('', \array_map('chr', $this->toArray())); } } $publicKey = new Buffer(\hex2bin('F1F5AC76CC3BCA543DBF7DEBFE77101343B72ABE582FF1D2E8767916EA792F32')); $signature = new Buffer(\hex2bin('4D363B793632444DC36FCB78F7993FC1C04FCA43F498ABC883DE772A7E616C98290D326306ABC772370E73338FD34D24B207F0F69F8652004001909B6907E986')); $publicKey[31] &= 0x7f; $publicKey[31] |= ($signature[63] & 0x80); $signature[63] &= 0x7f; var_dump(bin2hex((string)$publicKey)); var_dump(bin2hex((string)$signature));

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.5.30.0100.00719.18
8.5.20.0100.00819.65
8.5.10.0100.00817.03
8.5.00.0140.01022.04
8.4.180.0120.01219.73
8.4.170.0150.01020.54
8.4.160.0080.01324.07
8.4.150.0070.00616.89
8.4.140.0340.01317.57
8.4.130.0140.00717.91
8.4.120.0070.01020.74
8.4.110.0090.01122.13
8.4.100.0160.00418.09
8.4.90.0120.00917.64
8.4.80.0060.00222.61
8.4.70.0100.01117.91
8.4.60.0130.00817.96
8.4.50.0100.01118.64
8.4.40.0060.01017.80
8.4.30.0090.00019.86
8.4.20.0070.01418.80
8.4.10.0060.00317.97
8.3.300.0140.00620.98
8.3.290.0150.00620.92
8.3.280.0110.01118.50
8.3.270.0090.01216.69
8.3.260.0130.00716.93
8.3.250.0110.00918.72
8.3.240.0120.00716.66
8.3.230.0140.00516.56
8.3.220.0060.00217.11
8.3.210.0050.00316.82
8.3.200.0120.00916.73
8.3.190.0110.00617.13
8.3.180.0110.00718.88
8.3.170.0030.00516.84
8.3.160.0110.00817.18
8.3.150.0120.00616.65
8.3.140.0090.00020.53
8.3.130.0130.00618.60
8.3.120.0060.00320.73
8.3.110.0060.00320.94
8.3.100.0160.00324.06
8.3.90.0030.01326.77
8.3.80.0060.00318.68
8.3.70.0110.00718.55
8.3.60.0060.01316.86
8.3.50.0100.00818.50
8.3.40.0070.00718.69
8.3.30.0120.00318.96
8.3.20.0040.00419.28
8.3.10.0080.00021.03
8.3.00.0030.00723.52
8.2.300.0100.01124.08
8.2.290.0090.01120.22
8.2.280.0090.00916.61
8.2.270.0090.00917.14
8.2.260.0100.00716.57
8.2.250.0080.00818.61
8.2.240.0100.01019.22
8.2.230.0080.00022.58
8.2.220.0110.00437.54
8.2.210.0100.00326.77
8.2.200.0060.00316.88
8.2.190.0070.00716.63
8.2.180.0150.00316.75
8.2.170.0100.00622.96
8.2.160.0090.00919.04
8.2.150.0000.00824.18
8.2.140.0110.00324.66
8.2.130.0050.00321.25
8.2.120.0140.00026.35
8.2.110.0060.00322.11
8.2.100.0070.00718.03
8.2.90.0050.00319.36
8.2.80.0000.00917.97
8.2.70.0030.00518.05
8.2.60.0030.00717.93
8.2.50.0040.00418.10
8.2.40.0000.00819.46
8.2.30.0020.00519.42
8.2.20.0000.00818.17
8.2.10.0040.00418.22
8.2.00.0030.00619.39
8.1.340.0120.01019.94
8.1.330.0140.00616.47
8.1.320.0120.00816.26
8.1.310.0110.00716.11
8.1.300.0100.00718.63
8.1.290.0030.00630.84
8.1.280.0110.00725.92
8.1.270.0030.00622.03
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00722.60
8.1.230.0120.00617.71
8.1.220.0090.00017.74
8.1.210.0090.00018.77
8.1.200.0060.00317.38
8.1.190.0040.00417.10
8.1.180.0030.00718.10
8.1.170.0030.00518.43
8.1.160.0040.00418.89
8.1.150.0040.00418.84
8.1.140.0040.00417.73
8.1.130.0060.00319.05
8.1.120.0000.00817.39
8.1.110.0000.01017.51
8.1.100.0070.00017.39
8.1.90.0040.00717.50
8.1.80.0000.00817.55
8.1.70.0040.00417.53
8.1.60.0030.00517.59
8.1.50.0080.00017.46
8.1.40.0040.00417.57
8.1.30.0030.00517.62
8.1.20.0000.00817.67
8.1.10.0040.00417.63
8.1.00.0030.00717.59
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0070.00018.55
8.0.270.0030.00317.30
8.0.260.0000.00717.30
8.0.250.0000.00716.87
8.0.240.0030.00316.97
8.0.230.0050.00316.96
8.0.220.0040.00416.78
8.0.210.0050.00216.95
8.0.200.0040.00416.88
8.0.190.0000.00716.97
8.0.180.0080.00017.05
8.0.170.0090.00016.85
8.0.160.0030.00616.83
8.0.150.0080.00016.85
8.0.140.0040.00416.89
8.0.130.0000.00613.35
8.0.120.0040.00416.80
8.0.110.0040.00416.98
8.0.100.0000.00716.90
8.0.90.0040.00416.84
8.0.80.0110.00616.90
8.0.70.0000.00816.89
8.0.60.0040.00416.93
8.0.50.0030.00616.89
8.0.30.0070.01017.18
8.0.20.0120.01017.40
8.0.10.0050.00316.93
8.0.00.0070.01016.69
7.4.330.0000.00615.55
7.4.320.0030.00316.66
7.4.300.0000.00716.57
7.4.290.0030.00316.65
7.4.280.0070.00016.64
7.4.270.0070.00016.52
7.4.260.0040.00416.62
7.4.250.0040.00416.55
7.4.240.0000.00716.63
7.4.230.0080.00016.61
7.4.220.0000.00816.34
7.4.210.0020.01416.75
7.4.200.0070.00016.46
7.4.160.0070.01016.65
7.4.140.0090.01017.86
7.4.130.0030.01716.69
7.4.120.0100.00916.57
7.4.110.0030.01316.55
7.4.100.0040.01316.70
7.4.90.0000.01716.47
7.4.80.0090.01219.39
7.4.70.0100.00716.58
7.4.60.0160.00716.43
7.4.50.0060.00916.49
7.4.40.0090.00916.46
7.4.00.0060.00915.06
7.3.330.0050.00013.27
7.3.320.0000.00613.20
7.3.310.0080.00016.47
7.3.300.0000.00616.42
7.3.290.0030.00316.27
7.3.280.0060.01116.38
7.3.260.0110.00816.43
7.3.240.0120.00516.49
7.3.230.0070.01016.55
7.3.210.0090.00916.60
7.3.200.0120.00616.57
7.3.190.0150.00716.55
7.3.180.0080.01116.77
7.3.170.0110.00816.51
7.3.160.0150.00616.51
7.2.330.0060.01216.47
7.2.320.0130.00716.89
7.2.310.0070.01716.77
7.2.300.0030.01716.81
7.2.290.0100.01016.86
7.2.70.0760.01314.80
7.2.60.0680.00314.81
7.2.50.0750.00314.60
7.2.40.0690.00614.84
7.2.30.0780.00314.92
7.2.20.0800.00714.72
7.2.10.0770.00314.89
7.2.00.0710.00615.07
7.1.200.0030.01015.79
7.1.170.0700.00313.80
7.1.160.0680.00313.68
7.1.150.0990.01013.68
7.1.140.0820.00313.95
7.1.130.0710.00713.73
7.1.120.0680.00713.76
7.1.110.0720.00613.88
7.1.100.0900.00614.04
7.1.90.1350.00613.84
7.1.80.1070.00613.74
7.1.70.1060.00613.85
7.1.60.1070.01031.72
7.1.50.1500.01031.86
7.1.40.1340.01632.06
7.1.30.1250.01631.59
7.1.20.1590.01731.66
7.1.10.1190.00713.61
7.1.00.0780.01613.67

preferences:
53.89 ms | 1533 KiB | 5 Q