3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); final class Foo implements \Stringable { private function __construct(public readonly string $value) { } public static function fromString(string $string): self { return new self($string); } /** * {@inheritdoc} */ public function __toString(): string { return $this->value; } } $options = [ Foo::fromString('c'), Foo::fromString('b'), Foo::fromString('a'), Foo::fromString('ccc'), Foo::fromString('bcc'), ]; uasort($options, strnatcasecmp(...)); var_dump($options); var_dump(strnatcasecmp(Foo::fromString('c'), Foo::fromString('b')));

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.130.0100.01016.81
8.3.120.0030.00620.57
8.3.110.0150.00916.47
8.3.100.0040.01316.78
8.3.90.0200.00416.89
8.3.80.0130.00616.63
8.3.70.0090.00416.50
8.3.60.0030.00816.88
8.3.50.0060.00616.63
8.3.40.0140.00017.61
8.3.30.0130.00317.63
8.3.20.0120.00317.38
8.3.10.0030.01017.75
8.3.00.0090.00617.38
8.2.250.0040.00418.30
8.2.240.0100.01017.07
8.2.230.0110.00016.72
8.2.220.0090.00416.61
8.2.210.0070.00317.02
8.2.200.0070.00716.25
8.2.190.0060.00617.00
8.2.180.0080.00416.76
8.2.170.0120.00017.63
8.2.160.0120.00017.75
8.2.150.0110.00517.50
8.2.140.0080.00417.59
8.2.130.0120.00017.63
8.2.120.0000.01117.63
8.2.110.0040.00917.50
8.2.100.0100.00317.25
8.2.90.0100.00317.63
8.2.80.0090.00317.63
8.2.70.0040.00917.50
8.2.60.0060.00617.63
8.2.50.0070.00417.50
8.2.40.0030.00717.59
8.2.30.0060.00617.50
8.2.20.0030.00717.75
8.2.10.0040.00817.75
8.2.00.0090.00317.63
8.1.300.0040.00418.48
8.1.290.0080.00418.19
8.1.280.0040.00716.25
8.1.270.0030.01017.34
8.1.260.0080.00517.24
8.1.250.0050.01416.73
8.1.240.0170.00017.00
8.1.230.0180.00017.25
8.1.220.0160.00017.00
8.1.210.0140.00217.25
8.1.200.0140.00217.25
8.1.190.0150.00316.88
8.1.180.0230.00016.75
8.1.170.0160.00317.11
8.1.160.0090.00917.13
8.1.150.0080.00816.71
8.1.140.0140.00316.97
8.1.130.0140.00516.63
8.1.120.0130.00317.13
8.1.110.0170.00017.13
8.1.100.0040.01316.88
8.1.90.0190.00016.72
8.1.80.0140.00517.00
8.1.70.0070.01117.25
8.1.60.0130.00717.23
8.1.50.0110.00916.63
8.1.40.0250.00017.00
8.1.30.0190.00817.10
8.1.20.0110.01416.97
8.1.10.0210.00616.75
8.1.00.0170.01017.13

preferences:
27.07 ms | 403 KiB | 5 Q