summaryrefslogtreecommitdiff
path: root/other/php.php
blob: f1f3a2a8961d65e3f18199e93dde417023c87f1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/php
<?php

// $options = 0;
// $options = LIBXML_NONET;
$options = LIBXML_NOENT;

/* LIBXML_NOENT doesn't have any effect but
   libxml_disable_entity_loader(true) works */

$xml = simplexml_load_file($argv[1], "SimpleXMLElement", $options);
$data = (string)$xml;
echo strlen($data);
echo $data;
?>