3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Core\Bundle\Service\Property\Room\Rooms; class CountryMapping { const CZ = 'CZ'; const EN = 'EN'; public function get(string $countryIsoCode = null) : string // Works correctly if return type is removed { switch (strtoupper($countryIsoCode)) { case 'CZ': case 'SK': return self::CZ; // Works correctly if changed to CountryMapping::CZ default: return self::EN; // Works correctly if changed to CountryMapping::EN } } } $mapping = new CountryMapping(); var_dump($mapping->get('CZ'));
Output for git.master, git.master_jit, rfc.property-hooks
string(2) "CZ"

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