3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ceu = array( "Italy"=>"Rome", "Luxembourg"=>"Luxembourg", "Belgium"=> "Brussels", "Denmark"=>"Copenhagen", "Finland"=>"Helsinki", "France" => "Paris", "Slovakia"=>"Bratislava", "Slovenia"=>"Ljubljana", "Germany" => "Berlin", "Greece" => "Athens", "Ireland"=>"Dublin", "Netherlands"=>"Amsterdam", "Portugal"=>"Lisbon", "Spain"=>"Madrid", "Sweden"=>"Stockholm", "United Kingdom"=>"London", "Cyprus"=>"Nicosia", "Lithuania"=>"Vilnius", "Czech Republic"=>"Prague", "Estonia"=>"Tallin", "Hungary"=>"Budapest", "Latvia"=>"Riga", "Malta"=>"Valetta", "Austria" => "Vienna", "Poland"=>"Warsaw") ; sort($ceu); foreach ($ceu as $x => $x_value){ echo "The capital of " . $x . " is " . $x_value . "."; } ?>
based on K1n0t
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
The capital of 0 is Amsterdam.The capital of 1 is Athens.The capital of 2 is Berlin.The capital of 3 is Bratislava.The capital of 4 is Brussels.The capital of 5 is Budapest.The capital of 6 is Copenhagen.The capital of 7 is Dublin.The capital of 8 is Helsinki.The capital of 9 is Lisbon.The capital of 10 is Ljubljana.The capital of 11 is London.The capital of 12 is Luxembourg.The capital of 13 is Madrid.The capital of 14 is Nicosia.The capital of 15 is Paris.The capital of 16 is Prague.The capital of 17 is Riga.The capital of 18 is Rome.The capital of 19 is Stockholm.The capital of 20 is Tallin.The capital of 21 is Valetta.The capital of 22 is Vienna.The capital of 23 is Vilnius.The capital of 24 is Warsaw.