3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $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.)"; if ( $_SESSION['pack'] == "FL PACKAGE - 3DAY" ) { $dest = $array[1]; $exp = explode('- ', $_SESSION['pack']); $pack_days = str_replace('DAY', '', $exp); } //JAN - 1 //FEB - 2 //MAR - 3 //APR - 4 //MAY - 5 //JUN - 6 //JUL - 7 //AUG - 8 //SEP - 9 //OCT - 10 //NOV - 11 //DEC - 12 $explode = explode('/', $_POST['date_dep']); $day = $explode[1] + $pack_days; $month = $explode[0]; $year = $explode[2]; if ( ($explode[0] == 1 OR $explode[0] == 3 OR $explode[0] == 5 OR $explode[0] == 7 OR $explode[0] == 8 OR $explode[0] == 10 OR $explode[0] == 12) && $day > 31 ) { $day -= 31; $month += 1; } if ( ($explode[0] == 4 OR $explode[0] == 6 OR $explode[0] == 9 OR $explode[0] == 11) && $day > 30 ) { $day -= 30; $month += 1; } if ( $explode[0] == 2 && $day > 28 ) { $day -= 28; $month += 1; } if ( $month == 13 ) { $month -= 12; $year += 1; } $date = $month.'/'.$day.'/'.$year; $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:".$date."TANYT"; //leg 2.3 $children_ages = array(); $num = $_POST['children']; if ( $num == 0 ) { $children_imp = null; } else { for ($i = 0; $i <= $num - 2; $i++) { $children_ages[] = '15;'; } $children_ages[$i] = '15'; $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 git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "pack" in /in/85Ftc on line 13 Warning: Undefined array key "date_dep" in /in/85Ftc on line 33 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/85Ftc on line 33 Warning: Undefined array key 1 in /in/85Ftc on line 34 Warning: Undefined variable $pack_days in /in/85Ftc on line 34 Warning: Undefined array key 2 in /in/85Ftc on line 36 Warning: Undefined variable $dest in /in/85Ftc on line 65 Warning: Undefined array key "date_dep" in /in/85Ftc on line 66 Warning: Undefined variable $dest in /in/85Ftc on line 68 Warning: Undefined array key "children" in /in/85Ftc on line 73 Warning: Undefined array key "children" in /in/85Ftc on line 90 Warning: Undefined array key "adults" in /in/85Ftc on line 91 Warning: Cannot modify header information - headers already sent by (output started at /in/85Ftc:13) in /in/85Ftc on line 97

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:
39.39 ms | 403 KiB | 8 Q