'/language.operators.comparison#language.operators.comparison.ternary', '/??' => '/language.operators.comparison#language.operators.comparison.coalesce', '/??=' => '/language.operators.assignment#language.operators.assignment.other', ]; if (isset($shortcuts[$uri])) { header("Location: {$shortcuts[$uri]}"); exit; } })($_SERVER['REQUEST_URI'] ?? ''); // Get the modification date of this PHP file $timestamps = array(@getlastmod()); /* The date of prepend.inc represents the age of ALL included files. Please touch it if you modify any other include file (and the modification affects the display of the index page). The cost of stat'ing them all is prohibitive. */ $timestamps[] = @filemtime("include/prepend.inc"); // These are the only dynamic parts of the frontpage $timestamps[] = @filemtime("include/pregen-confs.inc"); $timestamps[] = @filemtime("include/pregen-news.inc"); $timestamps[] = @filemtime("include/version.inc"); $timestamps[] = @filemtime("js/common.js"); // The latest of these modification dates is our real Last-Modified date $timestamp = max($timestamps); // Note that this is not a RFC 822 date (the tz is always GMT) $tsstring = gmdate("D, d M Y H:i:s ", $timestamp) . "GMT"; // Check if the client has the same page cached if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && ($_SERVER["HTTP_IF_MODIFIED_SINCE"] == $tsstring)) { header("HTTP/1.1 304 Not Modified"); exit(); } // Inform the user agent what is our last modification date else { header("Last-Modified: " . $tsstring); } $_SERVER['BASE_PAGE'] = 'index.php'; include_once 'include/prepend.inc'; include_once 'include/branches.inc'; include_once 'include/pregen-confs.inc'; include_once 'include/pregen-news.inc'; include_once 'include/version.inc'; mirror_setcookie("LAST_NEWS", $_SERVER["REQUEST_TIME"], 60*60*24*365); $content = "
"; $frontpage = array(); foreach($NEWS_ENTRIES as $entry) { foreach($entry["category"] as $category) { if ($category["term"] == "frontpage") { $frontpage[] = $entry; if (count($frontpage) >= 25) { break 2; } } } } foreach($frontpage as $entry) { $link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $entry["id"]); $id = parse_url($entry["id"], PHP_URL_FRAGMENT); $date = date_create($entry['updated']); $date_human = date_format($date, 'd M Y'); $date_w3c = date_format($date, DATE_W3C); $content .= <<

{$entry["title"]}

{$entry["content"]}
NEWSENTRY; } $content .= '

Older News Entries

'; $content .= "
"; $intro = <<

A popular general-purpose scripting language that is especially suited to web development.
Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

What's new in 8.1 Download
EOF; $intro .= "\n"; $intro .= << EOF; // Write out common header $meta_image_path = $MYSITE . 'images/meta-image.png'; $meta_description = "PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world."; site_header("Hypertext Preprocessor", array( 'current' => 'home', 'headtags' => array( '', '' ), 'link' => array( array( "rel" => "search", "type" => "application/opensearchdescription+xml", "href" => $MYSITE . "phpnetimprovedsearch.src", "title" => "Add PHP.net search" ), array( "rel" => "alternate", "type" => "application/atom+xml", "href" => $MYSITE . "releases/feed.php", "title" => "PHP Release feed" ), ), 'css' => array('home.css'), 'intro' => $intro, 'meta_tags' => << META ) ); // Print body of home page. echo $content; // Prepare announcements. if (is_array($CONF_TEASER)) { $conftype = array( 'conference' => 'Upcoming conferences', 'cfp' => 'Conferences calling for papers', ); $announcements = ""; foreach($CONF_TEASER as $category => $entries) { if ($entries) { $announcements .= '
'; $announcements .= ' ' . $conftype[$category] .''; $announcements .= '
    '; foreach (array_slice($entries, 0, 4) as $url => $title) { $title = preg_replace("'([A-Za-z0-9])([\s\:\-\,]*?)call for(.*?)$'i", "$1", $title); $announcements .= "
  • $title
  • "; } $announcements .= '
'; $announcements .= '
'; } } } else { $announcements = ''; } $SIDEBAR = <<< SIDEBAR_DATA $announcements

User Group Events

Special Thanks

SIDEBAR_DATA; // Print the common footer. site_footer( array( "atom" => "/feed.atom", // Add a link to the feed at the bottom 'elephpants' => true, 'sidebar' => $SIDEBAR ) );