diff --git a/reference/apd/book.xml b/reference/apd/book.xml
new file mode 100644
index 0000000000..232c119297
--- /dev/null
+++ b/reference/apd/book.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+ Advanced PHP debugger
+ APD
+
+
+ &reftitle.intro;
+
+ APD is the Advanced PHP Debugger. It was written to provide profiling and
+ debugging capabilities for PHP code, as well as to provide the ability to
+ print out a full stack backtrace. APD supports interactive debugging, but
+ by default it writes data to trace files. It also offers event based
+ logging so that varying levels of information (including function calls,
+ arguments passed, timings, etc.) can be turned on or off for individual
+ scripts.
+
+
+ APD is a Zend Extension, modifying the way the internals of PHP handle
+ function calls, and thus may or may not be compatible with other Zend
+ Extensions (for example Zend Optimizer).
+
+
+
+
+
+ &reference.apd.setup;
+ &reference.apd.constants;
+ &reference.apd.examples;
+ &reference.apd.reference;
+
+
+
+
+
diff --git a/reference/apd/constants.xml b/reference/apd/constants.xml
index 0be71416bf..2890d1805b 100644
--- a/reference/apd/constants.xml
+++ b/reference/apd/constants.xml
@@ -1,6 +1,6 @@
-
-
+
+
&reftitle.constants;
&extension.constants;
@@ -97,7 +97,7 @@
-
+
+
+
+ &reftitle.examples;
+
+ How to use PHP-APD in your scripts
+
+
+
+ As the first line of your PHP script, call the apd_set_pprof_trace() function
+ to start the trace:
+
+
+
+
+
+
+
+ You can insert the line anywhere in your script, but if you do not start
+ tracing at the beginning of your script you discard profile data that might
+ otherwise lead you to a performance bottleneck.
+
+
+
+
+ Now run your script. The dump output will be written to
+ apd.dumpdir/pprof_pid.ext.
+
+
+ If you're running the CGI version of PHP, you will need to add the '-e'
+ flag to enable extended information for apd to work properly. For
+ example:
+ php -e -f script.php
+
+
+
+
+
+
+ To display formatted profile data, issue the pprofp
+ command with the sort and display options of your choice. The formatted
+ output will look something like:
+
+
+
+
+
+ The -R option used in this example sorts the profile table by the amount
+ of real time the script spent executing a given function. The "cumm call"
+ column reveals how many times each function was called, and the "s/call"
+ column reveals how many seconds each call to the function required, on
+ average.
+
+
+
+
+ To generate a calltree file that you can import into the KCacheGrind
+ profile analysis application, issue the pprof2calltree
+ comand.
+
+
+
+
+
+
+
+
diff --git a/reference/apd/ini.xml b/reference/apd/ini.xml
index ab7a696e53..2332114729 100644
--- a/reference/apd/ini.xml
+++ b/reference/apd/ini.xml
@@ -1,5 +1,5 @@
-
+
&reftitle.runtime;
&extension.runtime;
diff --git a/reference/apd/reference.xml b/reference/apd/reference.xml
index b56d05595c..4ed2ea2529 100644
--- a/reference/apd/reference.xml
+++ b/reference/apd/reference.xml
@@ -1,137 +1,24 @@
-
-
-
+
-
- Advanced PHP debugger
- APD
-
-
-
- &reftitle.intro;
-
- APD is the Advanced PHP Debugger. It was written to provide profiling and
- debugging capabilities for PHP code, as well as to provide the ability to
- print out a full stack backtrace. APD supports interactive debugging, but
- by default it writes data to trace files. It also offers event based
- logging so that varying levels of information (including function calls,
- arguments passed, timings, etc.) can be turned on or off for individual
- scripts.
-
-
- APD is a Zend Extension, modifying the way the internals of PHP handle
- function calls, and thus may or may not be compatible with other Zend
- Extensions (for example Zend Optimizer).
-
-
-
-
+
+ APD &Functions;
+
+
+ Contact information
+
+ If you have comments, bugfixes, enhancements or want to help developing
+ this beast, you can send an mail to
+ &email.apd;. Any help is very
+ welcome.
+
+
+
- &reference.apd.configure;
+ &reference.apd.entities.functions;
- &reference.apd.ini;
+
-
- &reftitle.resources;
- &no.resource;
-
-
- &reference.apd.constants;
-
-
- How to use PHP-APD in your scripts
-
-
-
- As the first line of your PHP script, call the apd_set_pprof_trace() function
- to start the trace:
-
-
-
-
-
-
-
- You can insert the line anywhere in your script, but if you do not start
- tracing at the beginning of your script you discard profile data that might
- otherwise lead you to a performance bottleneck.
-
-
-
-
- Now run your script. The dump output will be written to
- apd.dumpdir/pprof_pid.ext.
-
-
- If you're running the CGI version of PHP, you will need to add the '-e'
- flag to enable extended information for apd to work properly. For
- example:
- php -e -f script.php
-
-
-
-
-
-
-
- To display formatted profile data, issue the pprofp
- command with the sort and display options of your choice. The formatted
- output will look something like:
-
-
-
-
-
- The -R option used in this example sorts the profile table by the amount
- of real time the script spent executing a given function. The "cumm call"
- column reveals how many times each function was called, and the "s/call"
- column reveals how many seconds each call to the function required, on
- average.
-
-
-
-
- To generate a calltree file that you can import into the KCacheGrind
- profile analysis application, issue the pprof2calltree
- comand.
-
-
-
-
-
-
- Contact information
-
- If you have comments, bugfixes, enhancements or want to help developing
- this beast, you can send an mail to
- &email.apd;. Any help is very
- welcome.
-
-
-
-
-&reference.apd.entities.functions;
-
-
+
diff --git a/reference/apd/setup.xml b/reference/apd/setup.xml
new file mode 100644
index 0000000000..e9d81e5b46
--- /dev/null
+++ b/reference/apd/setup.xml
@@ -0,0 +1,42 @@
+
+
+
+
+ &reftitle.setup;
+
+
+ &reftitle.required;
+ &no.requirement;
+
+
+ &reference.apd.configure;
+
+ &reference.apd.ini;
+
+
+ &reftitle.resources;
+ &no.resource;
+
+
+
+
+
+