3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); // lint >= 8.1 namespace Bug11619Strict; final class Foo implements \Stringable { private function __construct(public readonly string $value) { } public static function fromString(string $string): self { return new self($string); } public function __toString(): string { return $this->value; } } function test(): void { $options = [ Foo::fromString('c'), Foo::fromString('b'), Foo::fromString('a'), ]; uasort($options, 'strnatcasecmp'); usort($options, 'strnatcasecmp'); } test();

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.0430.00416.16
8.5.20.0340.01216.16
8.5.10.0320.00416.39
8.5.00.0290.00916.36
8.4.180.0260.01019.68
8.4.170.0140.00619.53
8.4.160.0320.00919.67
8.4.150.0300.00819.64
8.4.140.0340.00917.52
8.4.130.0380.01217.38
8.4.120.0310.00817.74
8.4.110.0340.01017.77
8.4.100.0340.01217.78
8.4.90.0390.01117.63
8.4.80.0390.00717.66
8.4.70.0360.01017.69
8.4.60.0420.00417.64
8.4.50.0370.00817.65
8.4.40.0460.00617.49
8.4.30.0400.01117.53
8.4.20.0400.00817.71
8.4.10.0390.01017.79
8.3.300.0300.01318.29
8.3.290.0310.01518.22
8.3.280.0340.00418.37
8.3.270.0340.01216.54
8.3.260.0360.00916.59
8.3.250.0340.00816.61
8.3.240.0350.00816.79
8.3.230.0360.00816.49
8.3.220.0370.00816.56
8.3.210.0350.01016.57
8.3.200.0380.01216.57
8.3.190.0310.00916.64
8.3.180.0290.00716.60
8.3.170.0340.00816.30
8.3.160.0230.00616.71
8.3.150.0320.00516.45
8.3.140.0150.00716.75
8.3.130.0140.00416.79
8.3.120.0150.00416.78
8.3.110.0210.00516.48
8.3.100.0160.00516.76
8.3.90.0290.00516.59
8.3.80.0260.00516.73
8.3.70.0230.00716.54
8.3.60.0170.00416.79
8.3.50.0200.00416.56
8.3.40.0370.00817.92
8.3.30.0260.01017.91
8.3.20.0290.00717.96
8.3.10.0110.00617.85
8.3.00.0250.01017.92

preferences:
52.42 ms | 708 KiB | 5 Q