PHP Classes

File: PHPInfoParserTest.php

Recommend this page to a friend!
  Classes of Stefan Kientzler   PHPInfo Compare Online   PHPInfoParserTest.php   Download  
File: PHPInfoParserTest.php
Role: Example script
Content type: text/plain
Description: Example php-script
Class: PHPInfo Compare Online
Parse and compare PHP configuration versions
Author: By
Last change:
Date: 4 years ago
Size: 627 bytes
 

Contents

Class file image Download
<?php
require_once 'lib/Helper/PHPInfoParser.php';

use
lib\Helper\PHPInfoParser;

   
// create object
   
$oInfo = new PHPInfoParser();

   
// parse local info and save to XML-File
   
$oInfo->parse();
   
$oInfo->save('phpinfo.xml');

   
header('Content-Type: text/xml');
    echo
$oInfo->saveXML();
   
   
/*
    // compare local phpinfo with saved info-file
    $oInfo->compareWith('phpinfoFG.xml');
    echo $oInfo->reportDiff(PHPInfoParser::REPORT_HTML);
    */
   
    /*
    // compare two saved info-files
    $oInfo->compareFiles('phpinfoCompare1.xml', 'phpinfoCompare2.xml');
    echo $oInfo->reportDiff(PHPInfoParser::REPORT_HTML);
    */