3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class JiraStatusMapper { /** * @var array */ protected static $map = [ 0 => JiraTicketStatus::OPEN, ]; /** * @param int $id * * @return string */ public static function getJiraStatusByPackageStatusId(int $id) { $status = self::$map[$id]; if (!$status) { throw new \OutOfRangeException(); } return $status; } } $x = new \JiraStatusMapper(); var_dump($x::getJiraStatusByPackageStatusId(0));
based on mGcD3