OpenAutonomy Reference Implementation Wiki
OpenAutonomy PHP server and related tools
Status: Beta
Brought to you by:
openautonomy
Below is a an example of the different outputs created by running p2pc in its 3 different modes on a simple set of input files.
The files listed here are the inputs used for all the running modes to follow.
test_input.php
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
resources/a.php
<?php
echo "A\n";
require_once('b.php');
require_once('d.php');
function unused($foo)
{
return $foo + 1;
}
?>
resources/b.php
<?php
echo "B\n";
require_once('a.php');
require_once('e.php');
?>
resources/c.php
<?php
require_once('f.php');
echo "C\n";
?>
resources/d.php
<?php
echo "D\n";
require_once('b.php');
?>
resources/e.php
<?php
echo "E\n";
require_once('a.php');
?>
resources/f.php
<?php
echo "F\n";
?>
Note that all of these programs produce the same result.
--preprocess
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
--strip
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
--deadCode
1 2 3 4 5 6 7 8 9 10 11 12 |
|