3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(-1); ini_set('display_errors', 'On'); interface Transip_DomainService { public const AVAILABILITY_INYOURACCOUNT = 'inyouraccount'; public const AVAILABILITY_UNAVAILABLE = 'unavailable'; public const AVAILABILITY_FREE = 'free'; public const AVAILABILITY_NOTFREE = 'notfree'; } $priority = [ Transip_DomainService::AVAILABILITY_FREE => 0, Transip_DomainService::AVAILABILITY_NOTFREE => 1, Transip_DomainService::AVAILABILITY_UNAVAILABLE => 2, Transip_DomainService::AVAILABILITY_INYOURACCOUNT => 3, ]; $domainCheckResults = [ (object) ['domainName' => 'a', 'status' => Transip_DomainService::AVAILABILITY_NOTFREE], (object) ['domainName' => 'b', 'status' => Transip_DomainService::AVAILABILITY_UNAVAILABLE], (object) ['domainName' => 'c', 'status' => Transip_DomainService::AVAILABILITY_INYOURACCOUNT], (object) ['domainName' => 'd', 'status' => Transip_DomainService::AVAILABILITY_FREE], (object) ['domainName' => 'e', 'status' => Transip_DomainService::AVAILABILITY_INYOURACCOUNT], (object) ['domainName' => 'f', 'status' => Transip_DomainService::AVAILABILITY_FREE], ]; usort($domainCheckResults, function ($a, $b) use ($priority) { return $priority[$a->status] <=> $priority[$b->status]; }); print_r($domainCheckResults);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => stdClass Object ( [domainName] => d [status] => free ) [1] => stdClass Object ( [domainName] => f [status] => free ) [2] => stdClass Object ( [domainName] => a [status] => notfree ) [3] => stdClass Object ( [domainName] => b [status] => unavailable ) [4] => stdClass Object ( [domainName] => c [status] => inyouraccount ) [5] => stdClass Object ( [domainName] => e [status] => inyouraccount ) )

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:
28.73 ms | 407 KiB | 5 Q