3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array[0] = 'Los%20Angeles,%20CA,%20United%20States%20(LAX-Los%20Angeles%20Intl.)'; $array[1] = "Miami,%20FL,%20United%20States%20(MIA-Miami%20Intl.)"; $array[2] = "Nassau,%20Bahamas%20(NAS-Nassau%20Intl.)"; $array[3] = "Honolulu,%20HI,%20United%20States%20(HNL-Honolulu%20Intl.)"; $array[4] = "Mexico%20City,%20Distrito%20Federal,%20Mexico%20(MEX-Mexico%20City%20Intl.)"; $array[5] = "George%20Town,%20Cayman%20Islands%20(GCM-Owen%20Roberts%20Intl.)"; $lower_trim = str_replace(" ", "", strtoupper($_POST['dest'])); if ( $lower_trim == "MIAMI" || $lower_trim == "MIAMI,FL" || $lower_trim == "MIAMI,FLORIDA" || $lower_trim == "FL" ) { $dest = $array[1]; } if ( $lower_trim == "LOSANGELES" || $lower_trim == "LA" || $lower_trim == "LOSANGELES,CALIFORNIA" || $lower_trim == "ANAHEIM" || $lower_trim == "ANAHEIM,CALIFORNIA" || $lower_trim == "ANAHEIM,CA" || $lower_trim == "LOSANGELES,CA" || $lower_trim == "LA,CA" || $lower_trim == "CA" ) { $dest = $array[0]; } if ( $lower_trim == "NASSAU" || $lower_trim == "NEW PROVIDENCE" || $lower_trim == "NASSAU,BAHAMAS" || $lower_trim == "NASSSAU,THEBAHAMAS" || $lower_trim == "THEBAHAMAS" || $lower_trim == "NASSAU,NEWPROVIDENCE" || $lower_trim == "NASSAU,NEWPROVIDENCE,THEBAHAMAS" ) { $dest = $array[2]; } if ( $lower_trim == "HONOLULU" || $lower_trim == "HONOLULU,HAWAII" || $lower_trim == "HAWAII" || $lower_trim == "HI" || $lower_trim == "HONOLULU,HI" ) { $dest = $array[3]; } if ( $lower_trim == "MEXICOCITY" || $lower_trim == "MEXICOCITY,FEDERALDISTRICT,MEXICO" || $lower_trim == "MEXICOCITY,MEXICO" || $lower_trim == "MEXICO" || $lower_trim == "FEDERALDISTRICT" ) { $dest = $array[4]; } if ( $lower_trim == "GEORGETOWN" || $lower_trim == "GEORGETOWN,CAYMANISLANDS" || $lower_trim == "CAYMANISLANDS" ) { $dest = $array[5]; } $from = "from:FLL"; //leg1 $from2 = ",to:".$dest; //leg1.2 $datefrom = ",departure:".$_POST['date_dep']."TANYT"; //leg1.3 $to = "from:".$dest; //leg2 $to2 = ",to:FLL"; //leg2.1 $dateto = ",departure:".$_POST['date_ret']."TANYT"; //leg 2.3 $children_ages = array(); foreach ( $i = 0; $i <= $_POST['children']; $i++ ) { $children_ages[] = '17;'; } $children_ages[$i] = '17'; $children_imp = implode($children_ages); $children = "children:".$_POST['children']."[".$children_imp."]"; $adults = ",adults:".$_POST['adults']; $seniors = ",seniors:0"; $infant_in = ",infantinlap:Y"; $url_formatted = "http://www.travelocity.com/Flights-Search?trip=roundtrip&leg1=".$from.$from2.$datefrom."&leg2=".$to.$to2.$dateto."&passengers=".$children.$adults.$seniors.$infant_in."&mode=search"; header('Location: '.$url_formatted);
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.34
Parse error: syntax error, unexpected ';' in /in/p94U5 on line 52
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ';' in /in/p94U5 on line 52
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/p94U5 on line 52
Process exited with code 255.

preferences:
221.19 ms | 1394 KiB | 124 Q