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();
Output for git.master_jit, git.master

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.92 ms | 696 KiB | 4 Q