| 1 |
lars |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* Get the Compatibility info for a chunk of code
|
|
|
4 |
*
|
|
|
5 |
* This example show the new options|features available with API 1.8.0
|
|
|
6 |
* Especially the xml renderer
|
|
|
7 |
*
|
|
|
8 |
* PHP versions 4 and 5
|
|
|
9 |
*
|
|
|
10 |
* @category PHP
|
|
|
11 |
* @package PHP_CompatInfo
|
|
|
12 |
* @author Laurent Laville <pear@laurent-laville.org>
|
|
|
13 |
* @license http://www.opensource.org/licenses/bsd-license.php BSD
|
|
|
14 |
* @version CVS: $Id: pci180_parsedata_toxml.php,v 1.2 2008/07/22 20:26:45 farell Exp $
|
|
|
15 |
* @link http://pear.php.net/package/PHP_CompatInfo
|
|
|
16 |
* @since version 1.8.0RC2 (2008-07-18)
|
|
|
17 |
* @ignore
|
|
|
18 |
*/
|
|
|
19 |
header('Content-type: text/xml');
|
|
|
20 |
|
|
|
21 |
require_once 'PHP/CompatInfo.php';
|
|
|
22 |
|
|
|
23 |
/*
|
|
|
24 |
With API 1.8.0 you may choose a custom render,
|
|
|
25 |
between all default renderers (all customizable).
|
|
|
26 |
|
|
|
27 |
Here we choose to display result as XML stream,
|
|
|
28 |
Even if PEAR::XML_Beautifier package is available (installed) we won't use it
|
|
|
29 |
*/
|
|
|
30 |
$driverType = 'xml';
|
|
|
31 |
|
|
|
32 |
/*
|
|
|
33 |
Won't use PEAR::XML_Beautifier
|
|
|
34 |
(reason bug #5450 http://pear.php.net/bugs/bug.php?id=5450, that strip XML declaration)
|
|
|
35 |
*/
|
|
|
36 |
$driverOptions = array('use-beautifier' => 'no');
|
|
|
37 |
|
|
|
38 |
$source = array('C:\wamp\tmp\Log-1.10.0\Log', 'C:\wamp\tmp\File_Find-1.3.0\Find.php');
|
|
|
39 |
$options = array('debug' => true);
|
|
|
40 |
|
|
|
41 |
$compatInfo = new PHP_CompatInfo($driverType, $driverOptions);
|
|
|
42 |
$compatInfo->parseData($source, $options);
|
|
|
43 |
?>
|