3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class PremiseFlags { const WIFI = 0x1; // (1) WiFi const PARKING = 0x2; // (2) Parkování const ACCESS_FOR_DISABLED = 0x4; // (4) Bezbariérový přístup const SUITABLE_FOR_CHILDREN = 0x8; // (8) Vhodné pro děti const ANIMALS_ALLOWED = 0x10; // (16) Domácí zvířata const CZECH_LANGUAGE = 0x20; // (32) Komunikace v českém jazyce const ONLINE_RESERVATION = 0x40; // (64) Možnost online rezervace const OWN_RESTAURANT = 0x80; // (128) Vlastní restaurace const REFRESHMENT = 0x100; // (256) Občerstvení const OUTDOOR_TABLES = 0x200; // (512) Letní zahrádka const CHILDRENS_CORNER = 0x400; // (1024) Dětský koutek const WELLNESS = 0x800; // (2048) Wellness const FITNESS = 0x1000; // (4096) Fitness const SHOWERS = 0x2000; // (8192) Možnost sprchy const OUTDOOR_POOL = 0x4000; // (16384) Venkovní bazén const INDOOR_POOL = 0x8000; // (32768) Vnitřní bazén const BICYCLE_STORAGE = 0x10000; // (65536) Kolárna const SKI_STORAGE = 0x20000; // (131072) Lyžárna /** * @return string[] */ public static function getNames() { static $names = array( self::WIFI => 'WiFi', self::PARKING => 'Parkování', self::ACCESS_FOR_DISABLED => 'Bezbariérový přístup', self::SUITABLE_FOR_CHILDREN => 'Vhodné pro děti', self::ANIMALS_ALLOWED => 'Domácí zvířata', self::CZECH_LANGUAGE => 'Komunikace v českém jazyce', self::ONLINE_RESERVATION => 'Možnost online rezervace', self::OWN_RESTAURANT => 'Vlastní restaurace', self::REFRESHMENT => 'Občerstvení', self::OUTDOOR_TABLES => 'Letní zahrádka', self::CHILDRENS_CORNER => 'Dětský koutek', self::WELLNESS => 'Wellness', self::FITNESS => 'Fitness', self::SHOWERS => 'Možnost sprchy', self::OUTDOOR_POOL => 'Venkovní bazén', self::INDOOR_POOL => 'Vnitřní bazén', self::BICYCLE_STORAGE => 'Kolárna', self::SKI_STORAGE => 'Lyžárna', ); return $names; } /** * @param string * @return string */ public static function getName($value) { $names = self::getNames(); return $names[$value]; } } $a = PremiseFlags::getName(PremiseFlags::FITNESS); var_dump($a);
Output for git.master, git.master_jit, rfc.property-hooks
string(7) "Fitness"

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:
38.6 ms | 401 KiB | 8 Q