downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the Git repository for this website on git.php.net.

Source of: /releases/index.php

<?php
// $Id$
$_SERVER['BASE_PAGE'] = 'releases/index.php';
include_once
$_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
include_once
$_SERVER["DOCUMENT_ROOT"] . "/include/branches.inc";

if (isset(
$_GET["serialize"])) {
   
$RELEASES[5][$PHP_5_3_VERSION]["date"] = $PHP_5_3_DATE;
   
$RELEASES[5][$PHP_5_2_VERSION]["date"] = $PHP_5_2_DATE;
   
$RELEASES                              = $RELEASES + $OLDRELEASES;

    if (isset(
$_GET["version"])) {
       
$ver = (int)$_GET["version"];

        if (isset(
$RELEASES[$ver])) {
            list(
$version, $r) = each($RELEASES[$ver]);

            if (isset(
$_GET["max"])) {
               
$max = (int)$_GET["max"];
                if (
$max == -1) { $max = PHP_INT_MAX; }

               
$return = array($version => $r);

               
$count = 1;

               
/* check if other $RELEASES[$ver] are there */
                /* e.g., 5_2, 5_3, and 5_4 all exist and have a release */
               
while(($z = each($RELEASES[$ver])) && $count++ < $max) {
                   
$return[$z[0]] = $z[1];
                }

                foreach(
$OLDRELEASES[$ver] as $version => $release) {
                    if (
$max <= $count++) {
                        break;
                    }

                   
$return[$version] = $release;
                }
                echo
serialize($return);
            } else {
               
$r["version"] = $version;

                echo
serialize($r);
            }
        } else {
            echo
serialize(array("error" => "Unkown version"));
        }
    } else {
       
$array = array();
        foreach(
$RELEASES as $major => $release) {
            list(
$version, $r) = each($release);
           
$r["version"] = $version;
           
$array[$major] = $r;
        }
        echo
serialize($array);
    }
    return;
}


// Tarball list generated with:
// cvs status -v php[34]/INSTALL |grep 'php_'|awk '{print $1}'|grep -Ev '(RC[0-9]*|rc[_0-9]*|REL|[ab][a0-9-]+|b..rc.|b.pl.|bazaar|pre|[ab])$'|sed -e 's,php_,,' -e 's,_,.,g'|sort -n|while read ver; do echo "        <option value=\"php-${ver}.tar.gz\">$ver</option>"; done

// Show the two most recent EOLed branches.
$eol = array();
foreach (
get_eol_branches() as $major => $branches) {
    foreach (
$branches as $branch => $detail) {
       
$eol[$detail['date']] = sprintf('<li>%s: %s</li>', $branch, date('j M Y', $detail['date']));
    }
}
krsort($eol);
$eol = implode('', array_slice($eol, 0, 2));

$SIDEBAR_DATA = '
<h3>End of Life Dates</h3>

<p>
 The most recent branches to reach end of life status are:
</p>

<ul>'
.$eol.'</ul>

<p>
 You can also view a
 <a href="/eol.php">list of end of life dates for all branches</a>.
</p>

<h3>Other PHP Releases</h3>
<p>
 Release candidates and beta versions are not listed here.
 You will be able to find those as well as even PHP 3 and
 PHP 2 releases in the <a href="http://museum.php.net/">PHP
 Museum</a>.
</p>

<div class="information">
 <strong>Want a PHP serialize()d list of the PHP releases?</strong><br />
 <p>Add <a href="?serialize=1">?serialize=1</a> to the url</p>
 <p>Only want PHP 5 releases? <a href="?serialize=1&version=5">&version=5</a></p>
 <p>The last 3? <a href="?serialize=1&version=5&max=3">&max=3</a></p>
</div>
'
;

site_header("Releases");
?>

<h1>Unsupported Historical Releases</h1>

<p>
 We have collected all the official information and code available for
 past PHP releases. You can find more details on the current release
 on <a href="/downloads.php">our downloads page</a>. Please note that
 <em>older releases are listed for archival purposes only, and
 they are no longer supported</em>.
</p>

<p>
 <em>Note to Windows users: Only PHP 5.3+ versions are available as both VC6 and VC9 builds.
 All versions prior were built using VC6.</em>
</p>

<?php
function mk_rel($major, $ver, $date, $announcement, $source, $windows, $museum) {
   
printf("<a name=\"%s\"></a>\n<h2>%1\$s</h2>\n<ul>\n <li>Released: %s</li>\n <li>Announcement: ", ($pos = strpos($ver, " ")) ? substr($ver, 0, $pos) : $ver, $date);
    if (
$announcement) {
        if (
is_array($announcement)) {
            foreach(
$announcement as $ann => $url) {
                echo
'<a href="'.$url.'">' .$ann. '</a> ';
            }
        } else {
           
$url = str_replace(".", "_", $ver);
            echo
'<a href="/releases/' .$url. '.php">English</a>';
        }
    } else {
        echo
"None";
    }
    echo
"</li>\n";

    if (
$major != 3) {
        echo
' <li><a href="/ChangeLog-'.$major.'.php#' .$ver. '">ChangeLog</a></li>';
    }
    echo
"\n <li>\n  Download:\n";

    if (!
$museum) {
        echo
"<ul>\n";
        foreach(
array_merge($source, $windows) as $src) {
            echo
" <li>\n";
            if (isset(
$src['filename'])) {
               
download_link($src["filename"], $src["name"]); echo "<br />\n";
                if (isset(
$src["md5"])) {
                    echo
'<span class="md5sum">md5: ' .$src["md5"]. "</span>\n";
                }
            } else {
                echo
'<a href="'.$src['link'].'">'.$src['name'].'</a>';
            }
            echo
" </li>\n";
        }
        echo
"</ul>\n";
    } else {
        foreach(
$source as $src) {
           
printf('<a href="http://museum.php.net/php%d/%s">%s</a>'."\n", $major, $src["filename"], $src["name"]);
        }
        foreach(
$windows as $src) {
           
printf('<a href="http://museum.php.net/%s/%s">%s</a>'."\n", ($major == 5 ? "php5" : "win32"), $src["filename"], $src["name"]);
        }
    }

    echo
"  </li>\n";
    echo
" </ul>\n";
}

$latest = max(array_keys($OLDRELEASES));
foreach(
$OLDRELEASES as $major => $a) {
    echo
'<a name="v' .$major. '"></a>';
    if (
$major != $latest) {
        echo
"\n<hr />\n";
        if (
$major == 4) {
            echo
'<p>Support for PHP 4 has been <b style="color: red;">discontinued</b> since 2007-12-31. Please consider upgrading to PHP 5.</p>'."\n";
        }
    }

   
$i = 0;
    foreach(
$a as $ver => $release) {
       
$i++;
       
mk_rel(
           
$major,
           
$ver,
           
$release["date"],
            isset(
$release["announcement"]) ? $release["announcement"] : false,
           
$release["source"],
            (isset(
$release["windows"]) ? $release["windows"] : array()),
            isset(
$release["museum"]) ? $release["museum"] : ($i<3 ? false : true)
        );
    }
}

site_footer();

 
show source | credits | sitemap | contact | advertising | mirror sites