Location: PHPKode > scripts > PHP Version Parser > php-version-parser/TestPHPVersion.php3
<?php
require($DOCUMENT_ROOT."/library/headers/hPHPVersion.inc");
?>

<HTML>
<TITLE>Test php version splitter</TITLE>
<BODY>
<center>
<form method="post" action="<?php echo $PHP_SELF ?>">
Version (optional): <input type="text" name="version"><br>
Compare with (optional):<input type="text" name="cmpver"><br>
<input type="submit" name="submit">
</form>
<?php
if (!(empty($version))) {
    $ver1 = new PHPVer($version);
} else {
    $ver1 = new PHPVer();
}
?>
<table border=1>
  <tr bgcolor="#cccccc">
    <td align="right">
      <b>Full Version String:</b>
    </td>
    <td align="left">
      <?php echo $ver1->getVersionString(); ?>
    </td>
  </tr>
  <tr>
    <td align="right">
      <b>Major Version:</b>
    </td>
    <td align="left">
      <?php echo $ver1->getMajorVersion(); ?>
    </td>
  </tr>
  <tr>
    <td align="right">
      <b>Minor Version:</b>
    </td>
    <td align="left">
      <?php echo $ver1->getMinorVersion(); ?>
    </td>
  </tr>
  <tr>
    <td align="right">
      <b>Revision:</b>
    </td>
    <td align="left">
      <?php echo $ver1->getRevision(); ?>
    </td>
  </tr>
  <tr>
    <td align="right">
      <b>Alpha Revision Number:</b>
    </td>
    <td align="left">
      <?php echo $ver1->getAlphaRevision(); ?>
    </td>
  </tr>
  <tr>
    <td align="right">
      <b>Beta Revision Number:</b>
    </td>
    <td align="left">
      <?php echo $ver1->getBetaRevision(); ?>
    </td>
  </tr>
  <tr>
    <td align="right">
      <b>Patch Level Revision Number:</b>
    </td>
    <td align="left">
      <?php echo $ver1->getPatchLevelRevision(); ?>
    </td>
  </tr>
  <tr>
    <td align="right">
      <b>Release Candidate Number:</b>
    </td>
    <td align="left">
      <?php echo $ver1->getReleaseCandidateRevision(); ?>
    </td>
  </tr>
<?php
if (!(empty($cmpver))) {
?>
  <tr>
    <td align="right">
      <b>Compare Results with version <?php echo $cmpver ?>:</b>
    </td>
    <td align="left">
      <?php echo $ver1->compare($cmpver); ?>
    </td>
  </tr>
<?php
}
?>
</table>
</center>
</BODY>
</HTML>
Return current item: PHP Version Parser