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"); foreach($ceu as $country => $capital) { echo "The $country capital is $capital \n"; } ?>
based on FoDXa
Output for 4.3.0 - 7.1.0
The Italy capital is Rome The Luxembourg capital is Luxembourg The Belgium capital is Brussels The Denmark capital is Copenhagen The Finland capital is Helsinki The France capital is Paris The Slovakia capital is Bratislava The Slovenia capital is Ljubljana The Germany capital is Berlin The Greece capital is Athens The Ireland capital is Dublin The Netherlands capital is Amsterdam The Portugal capital is Lisbon The Spain capital is Madrid The Sweden capital is Stockholm The United Kingdom capital is London The Cyprus capital is Nicosia The Lithuania capital is Vilnius The Czech Republic capital is Prague The Estonia capital is Tallin The Hungary capital is Budapest The Latvia capital is Riga The Malta capital is Valetta The Austria capital is Vienna The Poland capital is Warsaw