3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $address = array( "id" => 17570527.00, "seq" => 0, "line1" => "1 Heron Close", "line2" => "Bradwell", "post_town" => "Great Yarmouth", "county" => "Norfolk", "postcode" => "NR31 8LY", "mailsort" => "54136", "barcode" => "(NR318LY1AA)", "is_residential" => 1, "is_small_organisation" => 0, "is_large_organisation" => 0, ); $lines = array(); if (array_key_exists("line1", $address)) $lines[] = $address["line1"]; if (array_key_exists("line2", $address)) $lines[] = $address["line2"]; if (array_key_exists("line3", $address)) $lines[] = $address["line3"]; if (array_key_exists("line4", $address)) $lines[] = $address["line4"]; if (array_key_exists("line4", $address)) $lines[] = $address["line5"]; echo implode("\n", $lines);
Output for 4.3.0 - 7.1.0
1 Heron Close Bradwell